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

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


