import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt();
      String[] S = new String[N];
      TreeMap<String,Integer> map = new TreeMap<>();
      int max = 0;
      for(int i=0;i<N;i++){
        S[i] = sc.next();
        if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        }
        if(max < map.get(S[i])){
          max=map.get(S[i]);
        }
      }
      for(String tan:map.keySet()){
        if(map.get(tan)==max){
          System.out.println(tan);
        }
        
      }
    }
  
  private static long lcm(long m, long n) {
    return m * n / gcd(m, n);
}
  
  private static long gcd(long m, long n) {
    if(m < n) return gcd(n, m);
    if(n == 0) return m;
    return gcd(n, m % n);
}
} 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[] S = new String[N];
      TreeMap<String,Integer> map = new TreeMap<>();
      int max = 0;
      for(int i=0;i<N;i++){
        S[i] = sc.next();
        if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        }
        if(max < map.get(S[i])){
          max=map.get(S[i]);
        }
      }
      for(String tan:map.keySet()){
        if(map.get(tan)==max){
          System.out.println(tan);
        }
        
      }
    }
  
  private static long lcm(long m, long n) {
    return m * n / gcd(m, n);
}
  
  private static long gcd(long m, long n) {
    if(m < n) return gcd(n, m);
    if(n == 0) return m;
    return gcd(n, m % n);
}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt();
      String[] S = new String[N];
      TreeMap<String,Integer> map = new TreeMap<>();
      int max = 0;
      for(int i=0;i<N;i++){
        S[i] = sc.next();
        if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        }
        if(max < map.get(S[i])){
          max=map.get(S[i]);
        }
      }
      for(String tan:map.keySet()){
        if(map.get(tan)==max){
          System.out.println(tan);
        }
        
      }
    } main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt();
      String[] S = new String[N];
      TreeMap<String,Integer> map = new TreeMap<>();
      int max = 0;
      for(int i=0;i<N;i++){
        S[i] = sc.next();
        if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        }
        if(max < map.get(S[i])){
          max=map.get(S[i]);
        }
      }
      for(String tan:map.keySet()){
        if(map.get(tan)==max){
          System.out.println(tan);
        }
        
      }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String[] S = new String[N]; S new String[N] N TreeMap<String,Integer> map = new TreeMap<>(); map new TreeMap<>() int max = 0; max 0 for(int i=0;i<N;i++){
        S[i] = sc.next();
        if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        }
        if(max < map.get(S[i])){
          max=map.get(S[i]);
        }
      } int i=0; int i=0; i 0 i<N i N i++ i++ i {
        S[i] = sc.next();
        if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        }
        if(max < map.get(S[i])){
          max=map.get(S[i]);
        }
      } {
        S[i] = sc.next();
        if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        }
        if(max < map.get(S[i])){
          max=map.get(S[i]);
        }
      } S[i] = sc.next() S[i] S i sc.next() sc.next sc if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        } map.containsKey(S[i]) map.containsKey map S[i] S i {
          map.put(S[i],map.get(S[i])+1);
        } map.put(S[i],map.get(S[i])+1) map.put map S[i] S i map.get(S[i])+1 map.get(S[i]) map.get map S[i] S i 1 {
          map.put(S[i],1);
        } map.put(S[i],1) map.put map S[i] S i 1 if(max < map.get(S[i])){
          max=map.get(S[i]);
        } max < map.get(S[i]) max map.get(S[i]) map.get map S[i] S i {
          max=map.get(S[i]);
        } max=map.get(S[i]) max map.get(S[i]) map.get map S[i] S i for(String tan:map.keySet()){
        if(map.get(tan)==max){
          System.out.println(tan);
        }
        
      } String tan map.keySet() map.keySet map {
        if(map.get(tan)==max){
          System.out.println(tan);
        }
        
      } {
        if(map.get(tan)==max){
          System.out.println(tan);
        }
        
      } if(map.get(tan)==max){
          System.out.println(tan);
        } map.get(tan)==max map.get(tan) map.get map tan max {
          System.out.println(tan);
        } System.out.println(tan) System.out.println System.out System System.out tan String[] args args private static long lcm(long m, long n) {
    return m * n / gcd(m, n);
} lcm {
    return m * n / gcd(m, n);
} return m * n / gcd(m, n); m * n / gcd(m, n) m * n m n gcd(m, n) gcd m n long m m long n n private static long gcd(long m, long n) {
    if(m < n) return gcd(n, m);
    if(n == 0) return m;
    return gcd(n, m % n);
} gcd {
    if(m < n) return gcd(n, m);
    if(n == 0) return m;
    return gcd(n, m % n);
} if(m < n) return gcd(n, m); m < n m n return gcd(n, m); gcd(n, m) gcd n m if(n == 0) return m; n == 0 n 0 return m; m return gcd(n, m % n); gcd(n, m % n) gcd n m % n m n long m m long n n public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt();
      String[] S = new String[N];
      TreeMap<String,Integer> map = new TreeMap<>();
      int max = 0;
      for(int i=0;i<N;i++){
        S[i] = sc.next();
        if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        }
        if(max < map.get(S[i])){
          max=map.get(S[i]);
        }
      }
      for(String tan:map.keySet()){
        if(map.get(tan)==max){
          System.out.println(tan);
        }
        
      }
    }
  
  private static long lcm(long m, long n) {
    return m * n / gcd(m, n);
}
  
  private static long gcd(long m, long n) {
    if(m < n) return gcd(n, m);
    if(n == 0) return m;
    return gcd(n, m % n);
}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt();
      String[] S = new String[N];
      TreeMap<String,Integer> map = new TreeMap<>();
      int max = 0;
      for(int i=0;i<N;i++){
        S[i] = sc.next();
        if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        }
        if(max < map.get(S[i])){
          max=map.get(S[i]);
        }
      }
      for(String tan:map.keySet()){
        if(map.get(tan)==max){
          System.out.println(tan);
        }
        
      }
    }
  
  private static long lcm(long m, long n) {
    return m * n / gcd(m, n);
}
  
  private static long gcd(long m, long n) {
    if(m < n) return gcd(n, m);
    if(n == 0) return m;
    return gcd(n, m % n);
}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt();
      String[] S = new String[N];
      TreeMap<String,Integer> map = new TreeMap<>();
      int max = 0;
      for(int i=0;i<N;i++){
        S[i] = sc.next();
        if(map.containsKey(S[i])){
          map.put(S[i],map.get(S[i])+1);
        }else{
          map.put(S[i],1);
        }
        if(max < map.get(S[i])){
          max=map.get(S[i]);
        }
      }
      for(String tan:map.keySet()){
        if(map.get(tan)==max){
          System.out.println(tan);
        }
        
      }
    }
  
  private static long lcm(long m, long n) {
    return m * n / gcd(m, n);
}
  
  private static long gcd(long m, long n) {
    if(m < n) return gcd(n, m);
    if(n == 0) return m;
    return gcd(n, m % n);
}
}
