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