import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;

public class Main {
  public static void main(String[] args) throws Exception {
    
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
    
    int n = Integer.parseInt(br.readLine());
    String s;
    Map<String, Integer> map = new TreeMap<>();
    int max = 0;
    for(int i=0; i<n; i++) {
      s = br.readLine();
      int val = map.containsKey(s) ? map.get(s) + 1:1;
      map.put(s, val);
      max = Math.max(max,val);
    }
    
    br.close();
    
    for(Entry<String, Integer> entry : map.entrySet()) {
      if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n");
    }
    
    bw.flush();
    
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.BufferedWriter; BufferedWriter java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.TreeMap; TreeMap java.util public class Main {
  public static void main(String[] args) throws Exception {
    
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
    
    int n = Integer.parseInt(br.readLine());
    String s;
    Map<String, Integer> map = new TreeMap<>();
    int max = 0;
    for(int i=0; i<n; i++) {
      s = br.readLine();
      int val = map.containsKey(s) ? map.get(s) + 1:1;
      map.put(s, val);
      max = Math.max(max,val);
    }
    
    br.close();
    
    for(Entry<String, Integer> entry : map.entrySet()) {
      if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n");
    }
    
    bw.flush();
    
  }
} Main public static void main(String[] args) throws Exception {
    
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
    
    int n = Integer.parseInt(br.readLine());
    String s;
    Map<String, Integer> map = new TreeMap<>();
    int max = 0;
    for(int i=0; i<n; i++) {
      s = br.readLine();
      int val = map.containsKey(s) ? map.get(s) + 1:1;
      map.put(s, val);
      max = Math.max(max,val);
    }
    
    br.close();
    
    for(Entry<String, Integer> entry : map.entrySet()) {
      if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n");
    }
    
    bw.flush();
    
  } main {
    
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
    
    int n = Integer.parseInt(br.readLine());
    String s;
    Map<String, Integer> map = new TreeMap<>();
    int max = 0;
    for(int i=0; i<n; i++) {
      s = br.readLine();
      int val = map.containsKey(s) ? map.get(s) + 1:1;
      map.put(s, val);
      max = Math.max(max,val);
    }
    
    br.close();
    
    for(Entry<String, Integer> entry : map.entrySet()) {
      if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n");
    }
    
    bw.flush();
    
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); bw new BufferedWriter(new OutputStreamWriter(System.out)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String s; s Map<String, Integer> map = new TreeMap<>(); map new TreeMap<>() int max = 0; max 0 for(int i=0; i<n; i++) {
      s = br.readLine();
      int val = map.containsKey(s) ? map.get(s) + 1:1;
      map.put(s, val);
      max = Math.max(max,val);
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      s = br.readLine();
      int val = map.containsKey(s) ? map.get(s) + 1:1;
      map.put(s, val);
      max = Math.max(max,val);
    } {
      s = br.readLine();
      int val = map.containsKey(s) ? map.get(s) + 1:1;
      map.put(s, val);
      max = Math.max(max,val);
    } s = br.readLine() s br.readLine() br.readLine br int val = map.containsKey(s) ? map.get(s) + 1:1; val map.containsKey(s) ? map.get(s) + 1:1 map.containsKey(s) map.containsKey map s map.get(s) + 1 map.get(s) map.get map s 1 1 map.put(s, val) map.put map s val max = Math.max(max,val) max Math.max(max,val) Math.max Math max val br.close() br.close br for(Entry<String, Integer> entry : map.entrySet()) {
      if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n");
    } Entry<String, Integer> entry map.entrySet() map.entrySet map {
      if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n");
    } {
      if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n");
    } if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n"); entry.getValue() == max entry.getValue() entry.getValue entry max bw.write(entry.getKey() + "\n") bw.write bw entry.getKey() + "\n" entry.getKey() entry.getKey entry "\n" bw.flush() bw.flush bw String[] args args public class Main {
  public static void main(String[] args) throws Exception {
    
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
    
    int n = Integer.parseInt(br.readLine());
    String s;
    Map<String, Integer> map = new TreeMap<>();
    int max = 0;
    for(int i=0; i<n; i++) {
      s = br.readLine();
      int val = map.containsKey(s) ? map.get(s) + 1:1;
      map.put(s, val);
      max = Math.max(max,val);
    }
    
    br.close();
    
    for(Entry<String, Integer> entry : map.entrySet()) {
      if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n");
    }
    
    bw.flush();
    
  }
} public class Main {
  public static void main(String[] args) throws Exception {
    
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
    
    int n = Integer.parseInt(br.readLine());
    String s;
    Map<String, Integer> map = new TreeMap<>();
    int max = 0;
    for(int i=0; i<n; i++) {
      s = br.readLine();
      int val = map.containsKey(s) ? map.get(s) + 1:1;
      map.put(s, val);
      max = Math.max(max,val);
    }
    
    br.close();
    
    for(Entry<String, Integer> entry : map.entrySet()) {
      if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n");
    }
    
    bw.flush();
    
  }
} Main
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;

public class Main {
  public static void main(String[] args) throws Exception {
    
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
    
    int n = Integer.parseInt(br.readLine());
    String s;
    Map<String, Integer> map = new TreeMap<>();
    int max = 0;
    for(int i=0; i<n; i++) {
      s = br.readLine();
      int val = map.containsKey(s) ? map.get(s) + 1:1;
      map.put(s, val);
      max = Math.max(max,val);
    }
    
    br.close();
    
    for(Entry<String, Integer> entry : map.entrySet()) {
      if(entry.getValue() == max)
        bw.write(entry.getKey() + "\n");
    }
    
    bw.flush();
    
  }
}