import java.util.*;

class Counter {
  int mCount = 1;
  public String toString() { return ""+mCount; }
}

public class Statistics {
  public static void main(String [] args) {
    Map<Integer, Counter> hm = new HashMap<Integer, Counter>();
    for (int i = 0; i < 10000; i++) {
      // produce a number between 0 and 20
      Integer r = new Integer((int) (Math.random() * 20));
      if (hm.containsKey(r)) {
        hm.get(r).mCount++;
      } else {
        hm.put(r, new Counter());
      }
    }
    System.out.println(hm);
    System.out.println(hm.keySet());
    System.out.println(hm.values());
  }
}

