import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
class Comp implements java.util.Comparator<HashMap<String, Integer>> {
	 
	public int compare(HashMap<String, Integer> o1, HashMap<String, Integer> o2) {
		return o1.get("key1") - o2.get("key1") > 0 ? 1 : o1.get("key1") - o2.get("key1") == 0 ? 0 : -1;
	}
 
}
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt(); 
		
		String[] s = new String[n];
		
		for(int i = 0; i < n; i++) {
			s[i] = stdIn.next();
		}
		
		
		Map<String,Integer> map = new TreeMap<>();
		
		
		
		
		for(int i = 0; i < n; i++) {
			if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			}
			map.put(s[i], map.get(s[i])+1);
			
		}
		int max = 0;
		
		for(int i = 0; i < n; i++) {
			max = Math.max(max, map.get(s[i]));
		}
		
	
	
		
		
		for(String a: map.keySet()) {
			if(map.get(a)== max) {
				System.out.println(a);
			}
		}
		
		
	}

} import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util class Comp implements java.util.Comparator<HashMap<String, Integer>> {
	 
	public int compare(HashMap<String, Integer> o1, HashMap<String, Integer> o2) {
		return o1.get("key1") - o2.get("key1") > 0 ? 1 : o1.get("key1") - o2.get("key1") == 0 ? 0 : -1;
	}
 
} Comp public int compare(HashMap<String, Integer> o1, HashMap<String, Integer> o2) {
		return o1.get("key1") - o2.get("key1") > 0 ? 1 : o1.get("key1") - o2.get("key1") == 0 ? 0 : -1;
	} compare {
		return o1.get("key1") - o2.get("key1") > 0 ? 1 : o1.get("key1") - o2.get("key1") == 0 ? 0 : -1;
	} return o1.get("key1") - o2.get("key1") > 0 ? 1 : o1.get("key1") - o2.get("key1") == 0 ? 0 : -1; o1.get("key1") - o2.get("key1") > 0 ? 1 : o1.get("key1") - o2.get("key1") == 0 ? 0 : -1 o1.get("key1") - o2.get("key1") > 0 o1.get("key1") - o2.get("key1") o1.get("key1") o1.get o1 "key1" o2.get("key1") o2.get o2 "key1" 0 1 o1.get("key1") - o2.get("key1") == 0 ? 0 : -1 o1.get("key1") - o2.get("key1") == 0 o1.get("key1") - o2.get("key1") o1.get("key1") o1.get o1 "key1" o2.get("key1") o2.get o2 "key1" 0 0 -1 1 HashMap<String, Integer> o1 o1 HashMap<String, Integer> o2 o2 Comparator public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt(); 
		
		String[] s = new String[n];
		
		for(int i = 0; i < n; i++) {
			s[i] = stdIn.next();
		}
		
		
		Map<String,Integer> map = new TreeMap<>();
		
		
		
		
		for(int i = 0; i < n; i++) {
			if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			}
			map.put(s[i], map.get(s[i])+1);
			
		}
		int max = 0;
		
		for(int i = 0; i < n; i++) {
			max = Math.max(max, map.get(s[i]));
		}
		
	
	
		
		
		for(String a: map.keySet()) {
			if(map.get(a)== max) {
				System.out.println(a);
			}
		}
		
		
	}

} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt(); 
		
		String[] s = new String[n];
		
		for(int i = 0; i < n; i++) {
			s[i] = stdIn.next();
		}
		
		
		Map<String,Integer> map = new TreeMap<>();
		
		
		
		
		for(int i = 0; i < n; i++) {
			if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			}
			map.put(s[i], map.get(s[i])+1);
			
		}
		int max = 0;
		
		for(int i = 0; i < n; i++) {
			max = Math.max(max, map.get(s[i]));
		}
		
	
	
		
		
		for(String a: map.keySet()) {
			if(map.get(a)== max) {
				System.out.println(a);
			}
		}
		
		
	} main {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt(); 
		
		String[] s = new String[n];
		
		for(int i = 0; i < n; i++) {
			s[i] = stdIn.next();
		}
		
		
		Map<String,Integer> map = new TreeMap<>();
		
		
		
		
		for(int i = 0; i < n; i++) {
			if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			}
			map.put(s[i], map.get(s[i])+1);
			
		}
		int max = 0;
		
		for(int i = 0; i < n; i++) {
			max = Math.max(max, map.get(s[i]));
		}
		
	
	
		
		
		for(String a: map.keySet()) {
			if(map.get(a)== max) {
				System.out.println(a);
			}
		}
		
		
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn String[] s = new String[n]; s new String[n] n for(int i = 0; i < n; i++) {
			s[i] = stdIn.next();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			s[i] = stdIn.next();
		} {
			s[i] = stdIn.next();
		} s[i] = stdIn.next() s[i] s i stdIn.next() stdIn.next stdIn Map<String,Integer> map = new TreeMap<>(); map new TreeMap<>() for(int i = 0; i < n; i++) {
			if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			}
			map.put(s[i], map.get(s[i])+1);
			
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			}
			map.put(s[i], map.get(s[i])+1);
			
		} {
			if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			}
			map.put(s[i], map.get(s[i])+1);
			
		} if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			} !map.containsKey(s[i]) map.containsKey(s[i]) map.containsKey map s[i] s i {
				map.put(s[i], 0);
			} map.put(s[i], 0) map.put map s[i] s i 0 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 int max = 0; max 0 for(int i = 0; i < n; i++) {
			max = Math.max(max, map.get(s[i]));
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			max = Math.max(max, map.get(s[i]));
		} {
			max = Math.max(max, map.get(s[i]));
		} max = Math.max(max, map.get(s[i])) max Math.max(max, map.get(s[i])) Math.max Math max map.get(s[i]) map.get map s[i] s i for(String a: map.keySet()) {
			if(map.get(a)== max) {
				System.out.println(a);
			}
		} String a map.keySet() map.keySet map {
			if(map.get(a)== max) {
				System.out.println(a);
			}
		} {
			if(map.get(a)== max) {
				System.out.println(a);
			}
		} if(map.get(a)== max) {
				System.out.println(a);
			} map.get(a)== max map.get(a) map.get map a max {
				System.out.println(a);
			} System.out.println(a) System.out.println System.out System System.out a String[] args args public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt(); 
		
		String[] s = new String[n];
		
		for(int i = 0; i < n; i++) {
			s[i] = stdIn.next();
		}
		
		
		Map<String,Integer> map = new TreeMap<>();
		
		
		
		
		for(int i = 0; i < n; i++) {
			if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			}
			map.put(s[i], map.get(s[i])+1);
			
		}
		int max = 0;
		
		for(int i = 0; i < n; i++) {
			max = Math.max(max, map.get(s[i]));
		}
		
	
	
		
		
		for(String a: map.keySet()) {
			if(map.get(a)== max) {
				System.out.println(a);
			}
		}
		
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt(); 
		
		String[] s = new String[n];
		
		for(int i = 0; i < n; i++) {
			s[i] = stdIn.next();
		}
		
		
		Map<String,Integer> map = new TreeMap<>();
		
		
		
		
		for(int i = 0; i < n; i++) {
			if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			}
			map.put(s[i], map.get(s[i])+1);
			
		}
		int max = 0;
		
		for(int i = 0; i < n; i++) {
			max = Math.max(max, map.get(s[i]));
		}
		
	
	
		
		
		for(String a: map.keySet()) {
			if(map.get(a)== max) {
				System.out.println(a);
			}
		}
		
		
	}

} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
class Comp implements java.util.Comparator<HashMap<String, Integer>> {
	 
	public int compare(HashMap<String, Integer> o1, HashMap<String, Integer> o2) {
		return o1.get("key1") - o2.get("key1") > 0 ? 1 : o1.get("key1") - o2.get("key1") == 0 ? 0 : -1;
	}
 
}
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt(); 
		
		String[] s = new String[n];
		
		for(int i = 0; i < n; i++) {
			s[i] = stdIn.next();
		}
		
		
		Map<String,Integer> map = new TreeMap<>();
		
		
		
		
		for(int i = 0; i < n; i++) {
			if(!map.containsKey(s[i])) {
				map.put(s[i], 0);
			}
			map.put(s[i], map.get(s[i])+1);
			
		}
		int max = 0;
		
		for(int i = 0; i < n; i++) {
			max = Math.max(max, map.get(s[i]));
		}
		
	
	
		
		
		for(String a: map.keySet()) {
			if(map.get(a)== max) {
				System.out.println(a);
			}
		}
		
		
	}

}
