// Client pour la table de hachage
class MostFrequent {
    public static void main(String[] args) {
        Hashtable t = new Hashtable();
        for (String s : args) {
            if (t.contains(s)) {
                int c = (int)t.get(s);
                t.put(s, c+1);
            } else {
                t.put(s, 1);
            }
        }
        String sMax = "";
        int cMax = 0;
        for (String s : args) {
            Integer c = (Integer)t.get(s);
            if (c > cMax) {
                cMax = c;
                sMax = s;
            }
        }
        System.out.println("most frequent " + sMax + " with " + cMax + " occurrences");
    }
}
