import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        String[] str = new String[n];
        int[] count = new int[n];
        String[] ans = new String[n];
        int max = 0;
        
        for(int i=0; i<n; i++){
            str[i] = sc.next();
            count[i]=0;
        }
        
        Arrays.sort(str);
        
        for(int i=0; i<n-1; i++){
        	for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            }
            max = Math.max(max, count[i]);
            i += count[i];
        }
        
        for(int i=0; i<n; i++){
        	if(max==count[i]){
            	System.out.println(str[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[] str = new String[n];
        int[] count = new int[n];
        String[] ans = new String[n];
        int max = 0;
        
        for(int i=0; i<n; i++){
            str[i] = sc.next();
            count[i]=0;
        }
        
        Arrays.sort(str);
        
        for(int i=0; i<n-1; i++){
        	for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            }
            max = Math.max(max, count[i]);
            i += count[i];
        }
        
        for(int i=0; i<n; i++){
        	if(max==count[i]){
            	System.out.println(str[i]);
            }
        }
   }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        String[] str = new String[n];
        int[] count = new int[n];
        String[] ans = new String[n];
        int max = 0;
        
        for(int i=0; i<n; i++){
            str[i] = sc.next();
            count[i]=0;
        }
        
        Arrays.sort(str);
        
        for(int i=0; i<n-1; i++){
        	for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            }
            max = Math.max(max, count[i]);
            i += count[i];
        }
        
        for(int i=0; i<n; i++){
        	if(max==count[i]){
            	System.out.println(str[i]);
            }
        }
   } main {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        String[] str = new String[n];
        int[] count = new int[n];
        String[] ans = new String[n];
        int max = 0;
        
        for(int i=0; i<n; i++){
            str[i] = sc.next();
            count[i]=0;
        }
        
        Arrays.sort(str);
        
        for(int i=0; i<n-1; i++){
        	for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            }
            max = Math.max(max, count[i]);
            i += count[i];
        }
        
        for(int i=0; i<n; i++){
        	if(max==count[i]){
            	System.out.println(str[i]);
            }
        }
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] str = new String[n]; str new String[n] n int[] count = new int[n]; count new int[n] n String[] ans = new String[n]; ans new String[n] n int max = 0; max 0 for(int i=0; i<n; i++){
            str[i] = sc.next();
            count[i]=0;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            str[i] = sc.next();
            count[i]=0;
        } {
            str[i] = sc.next();
            count[i]=0;
        } str[i] = sc.next() str[i] str i sc.next() sc.next sc count[i]=0 count[i] count i 0 Arrays.sort(str) Arrays.sort Arrays str for(int i=0; i<n-1; i++){
        	for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            }
            max = Math.max(max, count[i]);
            i += count[i];
        } int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
        	for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            }
            max = Math.max(max, count[i]);
            i += count[i];
        } {
        	for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            }
            max = Math.max(max, count[i]);
            i += count[i];
        } for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            } int j=i+1; int j=i+1; j i+1 i 1 j<n j n j++ j++ j {
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            } {
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            } if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                } str[i].equals(str[j]) str[i].equals str[i] str i str[j] str j {
                	count[i]++;
                } count[i]++ count[i] count i {
                	break;
                } break; max = Math.max(max, count[i]) max Math.max(max, count[i]) Math.max Math max count[i] count i i += count[i] i count[i] count i for(int i=0; i<n; i++){
        	if(max==count[i]){
            	System.out.println(str[i]);
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        	if(max==count[i]){
            	System.out.println(str[i]);
            }
        } {
        	if(max==count[i]){
            	System.out.println(str[i]);
            }
        } if(max==count[i]){
            	System.out.println(str[i]);
            } max==count[i] max count[i] count i {
            	System.out.println(str[i]);
            } System.out.println(str[i]) System.out.println System.out System System.out str[i] str i String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        String[] str = new String[n];
        int[] count = new int[n];
        String[] ans = new String[n];
        int max = 0;
        
        for(int i=0; i<n; i++){
            str[i] = sc.next();
            count[i]=0;
        }
        
        Arrays.sort(str);
        
        for(int i=0; i<n-1; i++){
        	for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            }
            max = Math.max(max, count[i]);
            i += count[i];
        }
        
        for(int i=0; i<n; i++){
        	if(max==count[i]){
            	System.out.println(str[i]);
            }
        }
   }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        String[] str = new String[n];
        int[] count = new int[n];
        String[] ans = new String[n];
        int max = 0;
        
        for(int i=0; i<n; i++){
            str[i] = sc.next();
            count[i]=0;
        }
        
        Arrays.sort(str);
        
        for(int i=0; i<n-1; i++){
        	for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            }
            max = Math.max(max, count[i]);
            i += count[i];
        }
        
        for(int i=0; i<n; i++){
        	if(max==count[i]){
            	System.out.println(str[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[] str = new String[n];
        int[] count = new int[n];
        String[] ans = new String[n];
        int max = 0;
        
        for(int i=0; i<n; i++){
            str[i] = sc.next();
            count[i]=0;
        }
        
        Arrays.sort(str);
        
        for(int i=0; i<n-1; i++){
        	for(int j=i+1; j<n; j++){
            	if(str[i].equals(str[j])){
                	count[i]++;
                }else{
                	break;
                }
            }
            max = Math.max(max, count[i]);
            i += count[i];
        }
        
        for(int i=0; i<n; i++){
        	if(max==count[i]){
            	System.out.println(str[i]);
            }
        }
   }
}
