import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] a = new String[N];
   for(int i=0;i<N;i++) a[i] = sc.next();
   Arrays.sort(a);
   int tmp = 1;
   int anstmp = 1;
   String tt = a[0];
   List<String> nn = new ArrayList<>();
   nn.add(a[0]);
   for(int i=1;i<N;i++) 
   {
     if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     }
   }
 

   for(int i = 0 ; i < nn.size() ;i++)
   {
     System.out.println(nn.get(i));
   }
 }
} import java.util.*; util.* java public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] a = new String[N];
   for(int i=0;i<N;i++) a[i] = sc.next();
   Arrays.sort(a);
   int tmp = 1;
   int anstmp = 1;
   String tt = a[0];
   List<String> nn = new ArrayList<>();
   nn.add(a[0]);
   for(int i=1;i<N;i++) 
   {
     if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     }
   }
 

   for(int i = 0 ; i < nn.size() ;i++)
   {
     System.out.println(nn.get(i));
   }
 }
} Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] a = new String[N];
   for(int i=0;i<N;i++) a[i] = sc.next();
   Arrays.sort(a);
   int tmp = 1;
   int anstmp = 1;
   String tt = a[0];
   List<String> nn = new ArrayList<>();
   nn.add(a[0]);
   for(int i=1;i<N;i++) 
   {
     if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     }
   }
 

   for(int i = 0 ; i < nn.size() ;i++)
   {
     System.out.println(nn.get(i));
   }
 } main {
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] a = new String[N];
   for(int i=0;i<N;i++) a[i] = sc.next();
   Arrays.sort(a);
   int tmp = 1;
   int anstmp = 1;
   String tt = a[0];
   List<String> nn = new ArrayList<>();
   nn.add(a[0]);
   for(int i=1;i<N;i++) 
   {
     if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     }
   }
 

   for(int i = 0 ; i < nn.size() ;i++)
   {
     System.out.println(nn.get(i));
   }
 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String[] a = new String[N]; a new String[N] N for(int i=0;i<N;i++) a[i] = sc.next(); int i=0; int i=0; i 0 i<N i N i++ i++ i a[i] = sc.next(); a[i] = sc.next() a[i] a i sc.next() sc.next sc Arrays.sort(a) Arrays.sort Arrays a int tmp = 1; tmp 1 int anstmp = 1; anstmp 1 String tt = a[0]; tt a[0] a 0 List<String> nn = new ArrayList<>(); nn new ArrayList<>() nn.add(a[0]) nn.add nn a[0] a 0 for(int i=1;i<N;i++) 
   {
     if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     }
   } int i=1; int i=1; i 1 i<N i N i++ i++ i {
     if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     }
   } {
     if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     }
   } if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     } tt.equals(a[i]) tt.equals tt a[i] a i {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     } tmp++ tmp if(tmp==anstmp)
       {
         nn.add(a[i]);
       } tmp==anstmp tmp anstmp {
         nn.add(a[i]);
       } nn.add(a[i]) nn.add nn a[i] a i if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       } tmp>anstmp tmp anstmp {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       } anstmp = tmp anstmp tmp nn.clear() nn.clear nn nn.add(a[i]) nn.add nn a[i] a i {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     } tmp = 1 tmp 1 tt = a[i] tt a[i] a i if(anstmp==1)
       {
         nn.add(a[i]);
       } anstmp==1 anstmp 1 {
         nn.add(a[i]);
       } nn.add(a[i]) nn.add nn a[i] a i for(int i = 0 ; i < nn.size() ;i++)
   {
     System.out.println(nn.get(i));
   } int i = 0 ; int i = 0 ; i 0 i < nn.size() i nn.size() nn.size nn i++ i++ i {
     System.out.println(nn.get(i));
   } {
     System.out.println(nn.get(i));
   } System.out.println(nn.get(i)) System.out.println System.out System System.out nn.get(i) nn.get nn i String[] args args public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] a = new String[N];
   for(int i=0;i<N;i++) a[i] = sc.next();
   Arrays.sort(a);
   int tmp = 1;
   int anstmp = 1;
   String tt = a[0];
   List<String> nn = new ArrayList<>();
   nn.add(a[0]);
   for(int i=1;i<N;i++) 
   {
     if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     }
   }
 

   for(int i = 0 ; i < nn.size() ;i++)
   {
     System.out.println(nn.get(i));
   }
 }
} public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] a = new String[N];
   for(int i=0;i<N;i++) a[i] = sc.next();
   Arrays.sort(a);
   int tmp = 1;
   int anstmp = 1;
   String tt = a[0];
   List<String> nn = new ArrayList<>();
   nn.add(a[0]);
   for(int i=1;i<N;i++) 
   {
     if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     }
   }
 

   for(int i = 0 ; i < nn.size() ;i++)
   {
     System.out.println(nn.get(i));
   }
 }
} Main
import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] a = new String[N];
   for(int i=0;i<N;i++) a[i] = sc.next();
   Arrays.sort(a);
   int tmp = 1;
   int anstmp = 1;
   String tt = a[0];
   List<String> nn = new ArrayList<>();
   nn.add(a[0]);
   for(int i=1;i<N;i++) 
   {
     if(tt.equals(a[i]))
     {
       tmp++;
       if(tmp==anstmp)
       {
         nn.add(a[i]);
       }
       if(tmp>anstmp)
       {
         anstmp = tmp;
         nn.clear();
         nn.add(a[i]);
       }
     }
     else
     {
       tmp = 1;
       tt = a[i];
       if(anstmp==1)
       {
         nn.add(a[i]);
       }
     }
   }
 

   for(int i = 0 ; i < nn.size() ;i++)
   {
     System.out.println(nn.get(i));
   }
 }
}