import java.util.*;
import java.util.Map.Entry;
 
 

class Main {
	 static int mod =  (int) (Math.pow(10,9)+7);
   public static void main(String[] args) {
	   
       Scanner sc = new Scanner(System.in);
       int N = sc.nextInt();
       String ans="APPROVED";
       
       String[] s = new String[(int)N];
       for (int i=0 ; i<N; i++) {
           s[i] = sc.next();
       }
       
       Arrays.sort(s);
       
       String[] t = new String[N];
       int[] cnt = new int[N];
       int tmp=-1;
       int max=0;
       for (int i=0 ; i<N; i++) {
    	   if(i==0||!s[i].equals(s[i-1])) {
    		   tmp++;
    		   t[tmp]=s[i];
    		   cnt[tmp]=1;
    	   } else {
    		   cnt[tmp]++;
    	   }
		   max=Math.max(max, cnt[tmp]);
       }
       
       for(int i=0;i<tmp+1;i++) {
    	   if(cnt[i]==max) {
    		   System.out.println(t[i]);
    	   }
       }
       
   }

} import java.util.*; util.* java import java.util.Map.Entry; Entry java.util.Map class Main {
	 static int mod =  (int) (Math.pow(10,9)+7);
   public static void main(String[] args) {
	   
       Scanner sc = new Scanner(System.in);
       int N = sc.nextInt();
       String ans="APPROVED";
       
       String[] s = new String[(int)N];
       for (int i=0 ; i<N; i++) {
           s[i] = sc.next();
       }
       
       Arrays.sort(s);
       
       String[] t = new String[N];
       int[] cnt = new int[N];
       int tmp=-1;
       int max=0;
       for (int i=0 ; i<N; i++) {
    	   if(i==0||!s[i].equals(s[i-1])) {
    		   tmp++;
    		   t[tmp]=s[i];
    		   cnt[tmp]=1;
    	   } else {
    		   cnt[tmp]++;
    	   }
		   max=Math.max(max, cnt[tmp]);
       }
       
       for(int i=0;i<tmp+1;i++) {
    	   if(cnt[i]==max) {
    		   System.out.println(t[i]);
    	   }
       }
       
   }

} Main static int mod =  (int) (Math.pow(10,9)+7); mod (int) (Math.pow(10,9)+7) Math.pow(10,9) Math.pow Math 10 9 7 public static void main(String[] args) {
	   
       Scanner sc = new Scanner(System.in);
       int N = sc.nextInt();
       String ans="APPROVED";
       
       String[] s = new String[(int)N];
       for (int i=0 ; i<N; i++) {
           s[i] = sc.next();
       }
       
       Arrays.sort(s);
       
       String[] t = new String[N];
       int[] cnt = new int[N];
       int tmp=-1;
       int max=0;
       for (int i=0 ; i<N; i++) {
    	   if(i==0||!s[i].equals(s[i-1])) {
    		   tmp++;
    		   t[tmp]=s[i];
    		   cnt[tmp]=1;
    	   } else {
    		   cnt[tmp]++;
    	   }
		   max=Math.max(max, cnt[tmp]);
       }
       
       for(int i=0;i<tmp+1;i++) {
    	   if(cnt[i]==max) {
    		   System.out.println(t[i]);
    	   }
       }
       
   } main {
	   
       Scanner sc = new Scanner(System.in);
       int N = sc.nextInt();
       String ans="APPROVED";
       
       String[] s = new String[(int)N];
       for (int i=0 ; i<N; i++) {
           s[i] = sc.next();
       }
       
       Arrays.sort(s);
       
       String[] t = new String[N];
       int[] cnt = new int[N];
       int tmp=-1;
       int max=0;
       for (int i=0 ; i<N; i++) {
    	   if(i==0||!s[i].equals(s[i-1])) {
    		   tmp++;
    		   t[tmp]=s[i];
    		   cnt[tmp]=1;
    	   } else {
    		   cnt[tmp]++;
    	   }
		   max=Math.max(max, cnt[tmp]);
       }
       
       for(int i=0;i<tmp+1;i++) {
    	   if(cnt[i]==max) {
    		   System.out.println(t[i]);
    	   }
       }
       
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String ans="APPROVED"; ans "APPROVED" String[] s = new String[(int)N]; s new String[(int)N] (int)N for (int i=0 ; i<N; i++) {
           s[i] = sc.next();
       } int i=0 ; int i=0 ; i 0 i<N i N i++ i++ i {
           s[i] = sc.next();
       } {
           s[i] = sc.next();
       } s[i] = sc.next() s[i] s i sc.next() sc.next sc Arrays.sort(s) Arrays.sort Arrays s String[] t = new String[N]; t new String[N] N int[] cnt = new int[N]; cnt new int[N] N int tmp=-1; tmp -1 1 int max=0; max 0 for (int i=0 ; i<N; i++) {
    	   if(i==0||!s[i].equals(s[i-1])) {
    		   tmp++;
    		   t[tmp]=s[i];
    		   cnt[tmp]=1;
    	   } else {
    		   cnt[tmp]++;
    	   }
		   max=Math.max(max, cnt[tmp]);
       } int i=0 ; int i=0 ; i 0 i<N i N i++ i++ i {
    	   if(i==0||!s[i].equals(s[i-1])) {
    		   tmp++;
    		   t[tmp]=s[i];
    		   cnt[tmp]=1;
    	   } else {
    		   cnt[tmp]++;
    	   }
		   max=Math.max(max, cnt[tmp]);
       } {
    	   if(i==0||!s[i].equals(s[i-1])) {
    		   tmp++;
    		   t[tmp]=s[i];
    		   cnt[tmp]=1;
    	   } else {
    		   cnt[tmp]++;
    	   }
		   max=Math.max(max, cnt[tmp]);
       } if(i==0||!s[i].equals(s[i-1])) {
    		   tmp++;
    		   t[tmp]=s[i];
    		   cnt[tmp]=1;
    	   } else {
    		   cnt[tmp]++;
    	   } i==0||!s[i].equals(s[i-1]) i==0 i 0 !s[i].equals(s[i-1]) s[i].equals(s[i-1]) s[i].equals s[i] s i s[i-1] s i-1 i 1 {
    		   tmp++;
    		   t[tmp]=s[i];
    		   cnt[tmp]=1;
    	   } tmp++ tmp t[tmp]=s[i] t[tmp] t tmp s[i] s i cnt[tmp]=1 cnt[tmp] cnt tmp 1 {
    		   cnt[tmp]++;
    	   } cnt[tmp]++ cnt[tmp] cnt tmp max=Math.max(max, cnt[tmp]) max Math.max(max, cnt[tmp]) Math.max Math max cnt[tmp] cnt tmp for(int i=0;i<tmp+1;i++) {
    	   if(cnt[i]==max) {
    		   System.out.println(t[i]);
    	   }
       } int i=0; int i=0; i 0 i<tmp+1 i tmp+1 tmp 1 i++ i++ i {
    	   if(cnt[i]==max) {
    		   System.out.println(t[i]);
    	   }
       } {
    	   if(cnt[i]==max) {
    		   System.out.println(t[i]);
    	   }
       } if(cnt[i]==max) {
    		   System.out.println(t[i]);
    	   } cnt[i]==max cnt[i] cnt i max {
    		   System.out.println(t[i]);
    	   } System.out.println(t[i]) System.out.println System.out System System.out t[i] t i String[] args args
import java.util.*;
import java.util.Map.Entry;
 
 

class Main {
	 static int mod =  (int) (Math.pow(10,9)+7);
   public static void main(String[] args) {
	   
       Scanner sc = new Scanner(System.in);
       int N = sc.nextInt();
       String ans="APPROVED";
       
       String[] s = new String[(int)N];
       for (int i=0 ; i<N; i++) {
           s[i] = sc.next();
       }
       
       Arrays.sort(s);
       
       String[] t = new String[N];
       int[] cnt = new int[N];
       int tmp=-1;
       int max=0;
       for (int i=0 ; i<N; i++) {
    	   if(i==0||!s[i].equals(s[i-1])) {
    		   tmp++;
    		   t[tmp]=s[i];
    		   cnt[tmp]=1;
    	   } else {
    		   cnt[tmp]++;
    	   }
		   max=Math.max(max, cnt[tmp]);
       }
       
       for(int i=0;i<tmp+1;i++) {
    	   if(cnt[i]==max) {
    		   System.out.println(t[i]);
    	   }
       }
       
   }

}