
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;


public class Main {



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

} import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {



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

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

} public class Main {



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

} Main

import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;


public class Main {



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

}