import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);

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

	public static void main(String[] args) {
		int N = sc.nextInt();
		Map<String, Integer> count = new TreeMap<String, Integer>();
		String base = sc.next();
		count.put(base, 1);
		for (int i = 1; i < N; i++) {
			String temp = sc.next();
			if (!count.containsKey(temp)) {
				count.put(temp, 1);
			} else {
				count.replace(temp, (count.get(temp) + 1));
			}
		}
		int temp = 0;
		for (String k : count.keySet()) {
			temp = Math.max(temp, count.get(k));
		}
		for (String k : count.keySet()) {
			if (temp == count.get(k)) {
				System.out.println(k);
			}
		}
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		int N = sc.nextInt();
		Map<String, Integer> count = new TreeMap<String, Integer>();
		String base = sc.next();
		count.put(base, 1);
		for (int i = 1; i < N; i++) {
			String temp = sc.next();
			if (!count.containsKey(temp)) {
				count.put(temp, 1);
			} else {
				count.replace(temp, (count.get(temp) + 1));
			}
		}
		int temp = 0;
		for (String k : count.keySet()) {
			temp = Math.max(temp, count.get(k));
		}
		for (String k : count.keySet()) {
			if (temp == count.get(k)) {
				System.out.println(k);
			}
		}
	} main {
		int N = sc.nextInt();
		Map<String, Integer> count = new TreeMap<String, Integer>();
		String base = sc.next();
		count.put(base, 1);
		for (int i = 1; i < N; i++) {
			String temp = sc.next();
			if (!count.containsKey(temp)) {
				count.put(temp, 1);
			} else {
				count.replace(temp, (count.get(temp) + 1));
			}
		}
		int temp = 0;
		for (String k : count.keySet()) {
			temp = Math.max(temp, count.get(k));
		}
		for (String k : count.keySet()) {
			if (temp == count.get(k)) {
				System.out.println(k);
			}
		}
	} int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Map<String, Integer> count = new TreeMap<String, Integer>(); count new TreeMap<String, Integer>() String base = sc.next(); base sc.next() sc.next sc count.put(base, 1) count.put count base 1 for (int i = 1; i < N; i++) {
			String temp = sc.next();
			if (!count.containsKey(temp)) {
				count.put(temp, 1);
			} else {
				count.replace(temp, (count.get(temp) + 1));
			}
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			String temp = sc.next();
			if (!count.containsKey(temp)) {
				count.put(temp, 1);
			} else {
				count.replace(temp, (count.get(temp) + 1));
			}
		} {
			String temp = sc.next();
			if (!count.containsKey(temp)) {
				count.put(temp, 1);
			} else {
				count.replace(temp, (count.get(temp) + 1));
			}
		} String temp = sc.next(); temp sc.next() sc.next sc if (!count.containsKey(temp)) {
				count.put(temp, 1);
			} else {
				count.replace(temp, (count.get(temp) + 1));
			} !count.containsKey(temp) count.containsKey(temp) count.containsKey count temp {
				count.put(temp, 1);
			} count.put(temp, 1) count.put count temp 1 {
				count.replace(temp, (count.get(temp) + 1));
			} count.replace(temp, (count.get(temp) + 1)) count.replace count temp (count.get(temp) + 1) count.get(temp) count.get count temp 1 int temp = 0; temp 0 for (String k : count.keySet()) {
			temp = Math.max(temp, count.get(k));
		} String k count.keySet() count.keySet count {
			temp = Math.max(temp, count.get(k));
		} {
			temp = Math.max(temp, count.get(k));
		} temp = Math.max(temp, count.get(k)) temp Math.max(temp, count.get(k)) Math.max Math temp count.get(k) count.get count k for (String k : count.keySet()) {
			if (temp == count.get(k)) {
				System.out.println(k);
			}
		} String k count.keySet() count.keySet count {
			if (temp == count.get(k)) {
				System.out.println(k);
			}
		} {
			if (temp == count.get(k)) {
				System.out.println(k);
			}
		} if (temp == count.get(k)) {
				System.out.println(k);
			} temp == count.get(k) temp count.get(k) count.get count k {
				System.out.println(k);
			} System.out.println(k) System.out.println System.out System System.out k String[] args args
import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int N = sc.nextInt();
		Map<String, Integer> count = new TreeMap<String, Integer>();
		String base = sc.next();
		count.put(base, 1);
		for (int i = 1; i < N; i++) {
			String temp = sc.next();
			if (!count.containsKey(temp)) {
				count.put(temp, 1);
			} else {
				count.replace(temp, (count.get(temp) + 1));
			}
		}
		int temp = 0;
		for (String k : count.keySet()) {
			temp = Math.max(temp, count.get(k));
		}
		for (String k : count.keySet()) {
			if (temp == count.get(k)) {
				System.out.println(k);
			}
		}
	}
}