import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    TreeMap<String,Integer> tm = new TreeMap<>();
    int max = 1;
    for(int i = 0;i<n;i++){
      String s = sc.next();
      if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      }
    }
    for(String ss: tm.keySet()){
      if(tm.get(ss) == max){
        System.out.println(ss);
      }
    }
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    TreeMap<String,Integer> tm = new TreeMap<>();
    int max = 1;
    for(int i = 0;i<n;i++){
      String s = sc.next();
      if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      }
    }
    for(String ss: tm.keySet()){
      if(tm.get(ss) == max){
        System.out.println(ss);
      }
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    TreeMap<String,Integer> tm = new TreeMap<>();
    int max = 1;
    for(int i = 0;i<n;i++){
      String s = sc.next();
      if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      }
    }
    for(String ss: tm.keySet()){
      if(tm.get(ss) == max){
        System.out.println(ss);
      }
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    TreeMap<String,Integer> tm = new TreeMap<>();
    int max = 1;
    for(int i = 0;i<n;i++){
      String s = sc.next();
      if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      }
    }
    for(String ss: tm.keySet()){
      if(tm.get(ss) == max){
        System.out.println(ss);
      }
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc TreeMap<String,Integer> tm = new TreeMap<>(); tm new TreeMap<>() int max = 1; max 1 for(int i = 0;i<n;i++){
      String s = sc.next();
      if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      }
    } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
      String s = sc.next();
      if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      }
    } {
      String s = sc.next();
      if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      }
    } String s = sc.next(); s sc.next() sc.next sc if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      } tm.containsKey(s) tm.containsKey tm s {
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      } tm.put(s,tm.get(s) + 1) tm.put tm s tm.get(s) + 1 tm.get(s) tm.get tm s 1 max = Math.max(max,tm.get(s)) max Math.max(max,tm.get(s)) Math.max Math max tm.get(s) tm.get tm s {
        tm.put(s,1);
      } tm.put(s,1) tm.put tm s 1 for(String ss: tm.keySet()){
      if(tm.get(ss) == max){
        System.out.println(ss);
      }
    } String ss tm.keySet() tm.keySet tm {
      if(tm.get(ss) == max){
        System.out.println(ss);
      }
    } {
      if(tm.get(ss) == max){
        System.out.println(ss);
      }
    } if(tm.get(ss) == max){
        System.out.println(ss);
      } tm.get(ss) == max tm.get(ss) tm.get tm ss max {
        System.out.println(ss);
      } System.out.println(ss) System.out.println System.out System System.out ss String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    TreeMap<String,Integer> tm = new TreeMap<>();
    int max = 1;
    for(int i = 0;i<n;i++){
      String s = sc.next();
      if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      }
    }
    for(String ss: tm.keySet()){
      if(tm.get(ss) == max){
        System.out.println(ss);
      }
    }
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    TreeMap<String,Integer> tm = new TreeMap<>();
    int max = 1;
    for(int i = 0;i<n;i++){
      String s = sc.next();
      if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      }
    }
    for(String ss: tm.keySet()){
      if(tm.get(ss) == max){
        System.out.println(ss);
      }
    }
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    TreeMap<String,Integer> tm = new TreeMap<>();
    int max = 1;
    for(int i = 0;i<n;i++){
      String s = sc.next();
      if(tm.containsKey(s)){
        tm.put(s,tm.get(s) + 1);
        max = Math.max(max,tm.get(s));
      }else{
        tm.put(s,1);
      }
    }
    for(String ss: tm.keySet()){
      if(tm.get(ss) == max){
        System.out.println(ss);
      }
    }
  }
}
