import java.io.*;
import java.util.*;
public class Main{
   
     public static void main(String []args){
       Scanner s=new Scanner(System.in);
       int n=s.nextInt();
       HashMap<String,Integer>hm=new HashMap<>();
       String a[]=new String[n];
       for(int i=0;i<n;i++)
       {a[i]=s.next();
       if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);}}
     int max=0;
     for(Integer i:hm.values())
       {if(max<i)
       {max=i;}}
       ArrayList<String>al=new ArrayList<>();
       for (Map.Entry mapElement : hm.entrySet()) { 
            String key = (String)mapElement.getKey(); 
            if(max==(int)mapElement.getValue()) 
            al.add(key);}
            Collections.sort(al);
           for(int i=0;i<al.size();i++)
           System.out.println(al.get(i));
     }} import java.io.*; io.* java import java.util.*; util.* java public class Main{
   
     public static void main(String []args){
       Scanner s=new Scanner(System.in);
       int n=s.nextInt();
       HashMap<String,Integer>hm=new HashMap<>();
       String a[]=new String[n];
       for(int i=0;i<n;i++)
       {a[i]=s.next();
       if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);}}
     int max=0;
     for(Integer i:hm.values())
       {if(max<i)
       {max=i;}}
       ArrayList<String>al=new ArrayList<>();
       for (Map.Entry mapElement : hm.entrySet()) { 
            String key = (String)mapElement.getKey(); 
            if(max==(int)mapElement.getValue()) 
            al.add(key);}
            Collections.sort(al);
           for(int i=0;i<al.size();i++)
           System.out.println(al.get(i));
     }} Main public static void main(String []args){
       Scanner s=new Scanner(System.in);
       int n=s.nextInt();
       HashMap<String,Integer>hm=new HashMap<>();
       String a[]=new String[n];
       for(int i=0;i<n;i++)
       {a[i]=s.next();
       if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);}}
     int max=0;
     for(Integer i:hm.values())
       {if(max<i)
       {max=i;}}
       ArrayList<String>al=new ArrayList<>();
       for (Map.Entry mapElement : hm.entrySet()) { 
            String key = (String)mapElement.getKey(); 
            if(max==(int)mapElement.getValue()) 
            al.add(key);}
            Collections.sort(al);
           for(int i=0;i<al.size();i++)
           System.out.println(al.get(i));
     } main {
       Scanner s=new Scanner(System.in);
       int n=s.nextInt();
       HashMap<String,Integer>hm=new HashMap<>();
       String a[]=new String[n];
       for(int i=0;i<n;i++)
       {a[i]=s.next();
       if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);}}
     int max=0;
     for(Integer i:hm.values())
       {if(max<i)
       {max=i;}}
       ArrayList<String>al=new ArrayList<>();
       for (Map.Entry mapElement : hm.entrySet()) { 
            String key = (String)mapElement.getKey(); 
            if(max==(int)mapElement.getValue()) 
            al.add(key);}
            Collections.sort(al);
           for(int i=0;i<al.size();i++)
           System.out.println(al.get(i));
     } Scanner s=new Scanner(System.in); s new Scanner(System.in) int n=s.nextInt(); n s.nextInt() s.nextInt s HashMap<String,Integer>hm=new HashMap<>(); hm new HashMap<>() String a[]=new String[n]; a new String[n] n for(int i=0;i<n;i++)
       {a[i]=s.next();
       if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);}} int i=0; int i=0; i 0 i<n i n i++ i++ i {a[i]=s.next();
       if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);}} {a[i]=s.next();
       if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);}} a[i]=s.next() a[i] a i s.next() s.next s if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);} hm.containsKey(a[i]) hm.containsKey hm a[i] a i {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);} int k=hm.get(a[i]); k hm.get(a[i]) hm.get hm a[i] a i k++ k hm.put(a[i],k) hm.put hm a[i] a i k {hm.put(a[i],1);} hm.put(a[i],1) hm.put hm a[i] a i 1 int max=0; max 0 for(Integer i:hm.values())
       {if(max<i)
       {max=i;}} Integer i hm.values() hm.values hm {if(max<i)
       {max=i;}} {if(max<i)
       {max=i;}} if(max<i)
       {max=i;} max<i max i {max=i;} max=i max i ArrayList<String>al=new ArrayList<>(); al new ArrayList<>() for (Map.Entry mapElement : hm.entrySet()) { 
            String key = (String)mapElement.getKey(); 
            if(max==(int)mapElement.getValue()) 
            al.add(key);} Map.Entry mapElement hm.entrySet() hm.entrySet hm { 
            String key = (String)mapElement.getKey(); 
            if(max==(int)mapElement.getValue()) 
            al.add(key);} { 
            String key = (String)mapElement.getKey(); 
            if(max==(int)mapElement.getValue()) 
            al.add(key);} String key = (String)mapElement.getKey(); key (String)mapElement.getKey() mapElement.getKey mapElement if(max==(int)mapElement.getValue()) 
            al.add(key); max==(int)mapElement.getValue() max (int)mapElement.getValue() mapElement.getValue mapElement al.add(key) al.add al key Collections.sort(al) Collections.sort Collections al for(int i=0;i<al.size();i++)
           System.out.println(al.get(i)); int i=0; int i=0; i 0 i<al.size() i al.size() al.size al i++ i++ i System.out.println(al.get(i)); System.out.println(al.get(i)) System.out.println System.out System System.out al.get(i) al.get al i String []args args public class Main{
   
     public static void main(String []args){
       Scanner s=new Scanner(System.in);
       int n=s.nextInt();
       HashMap<String,Integer>hm=new HashMap<>();
       String a[]=new String[n];
       for(int i=0;i<n;i++)
       {a[i]=s.next();
       if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);}}
     int max=0;
     for(Integer i:hm.values())
       {if(max<i)
       {max=i;}}
       ArrayList<String>al=new ArrayList<>();
       for (Map.Entry mapElement : hm.entrySet()) { 
            String key = (String)mapElement.getKey(); 
            if(max==(int)mapElement.getValue()) 
            al.add(key);}
            Collections.sort(al);
           for(int i=0;i<al.size();i++)
           System.out.println(al.get(i));
     }} public class Main{
   
     public static void main(String []args){
       Scanner s=new Scanner(System.in);
       int n=s.nextInt();
       HashMap<String,Integer>hm=new HashMap<>();
       String a[]=new String[n];
       for(int i=0;i<n;i++)
       {a[i]=s.next();
       if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);}}
     int max=0;
     for(Integer i:hm.values())
       {if(max<i)
       {max=i;}}
       ArrayList<String>al=new ArrayList<>();
       for (Map.Entry mapElement : hm.entrySet()) { 
            String key = (String)mapElement.getKey(); 
            if(max==(int)mapElement.getValue()) 
            al.add(key);}
            Collections.sort(al);
           for(int i=0;i<al.size();i++)
           System.out.println(al.get(i));
     }} Main
import java.io.*;
import java.util.*;
public class Main{
   
     public static void main(String []args){
       Scanner s=new Scanner(System.in);
       int n=s.nextInt();
       HashMap<String,Integer>hm=new HashMap<>();
       String a[]=new String[n];
       for(int i=0;i<n;i++)
       {a[i]=s.next();
       if(hm.containsKey(a[i]))
       {int k=hm.get(a[i]);
       k++;
       hm.put(a[i],k);}
       else
       {hm.put(a[i],1);}}
     int max=0;
     for(Integer i:hm.values())
       {if(max<i)
       {max=i;}}
       ArrayList<String>al=new ArrayList<>();
       for (Map.Entry mapElement : hm.entrySet()) { 
            String key = (String)mapElement.getKey(); 
            if(max==(int)mapElement.getValue()) 
            al.add(key);}
            Collections.sort(al);
           for(int i=0;i<al.size();i++)
           System.out.println(al.get(i));
     }}