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();
		int max = 0;
		Map<String, Integer> voteMap = new TreeMap<String, Integer>();

		for (int i = 0; i < N; i++) {
			String item = sc.next();

			if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			}
		}

		for (String string : voteMap.keySet()) {
			if (voteMap.get(string) == max) {
				System.out.println(string);
			}
		}
	}
} 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();
		int max = 0;
		Map<String, Integer> voteMap = new TreeMap<String, Integer>();

		for (int i = 0; i < N; i++) {
			String item = sc.next();

			if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			}
		}

		for (String string : voteMap.keySet()) {
			if (voteMap.get(string) == max) {
				System.out.println(string);
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int max = 0;
		Map<String, Integer> voteMap = new TreeMap<String, Integer>();

		for (int i = 0; i < N; i++) {
			String item = sc.next();

			if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			}
		}

		for (String string : voteMap.keySet()) {
			if (voteMap.get(string) == max) {
				System.out.println(string);
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int max = 0;
		Map<String, Integer> voteMap = new TreeMap<String, Integer>();

		for (int i = 0; i < N; i++) {
			String item = sc.next();

			if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			}
		}

		for (String string : voteMap.keySet()) {
			if (voteMap.get(string) == max) {
				System.out.println(string);
			}
		}
	} 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> voteMap = new TreeMap<String, Integer>(); voteMap new TreeMap<String, Integer>() for (int i = 0; i < N; i++) {
			String item = sc.next();

			if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			String item = sc.next();

			if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			}
		} {
			String item = sc.next();

			if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			}
		} String item = sc.next(); item sc.next() sc.next sc if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			} voteMap.containsKey(item) voteMap.containsKey voteMap item {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			} voteMap.put(item, voteMap.get(item) + 1) voteMap.put voteMap item voteMap.get(item) + 1 voteMap.get(item) voteMap.get voteMap item 1 if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				} max < voteMap.get(item) max voteMap.get(item) voteMap.get voteMap item {
					max = voteMap.get(item);
				} max = voteMap.get(item) max voteMap.get(item) voteMap.get voteMap item {
				voteMap.put(item, 0);
			} voteMap.put(item, 0) voteMap.put voteMap item 0 for (String string : voteMap.keySet()) {
			if (voteMap.get(string) == max) {
				System.out.println(string);
			}
		} String string voteMap.keySet() voteMap.keySet voteMap {
			if (voteMap.get(string) == max) {
				System.out.println(string);
			}
		} {
			if (voteMap.get(string) == max) {
				System.out.println(string);
			}
		} if (voteMap.get(string) == max) {
				System.out.println(string);
			} voteMap.get(string) == max voteMap.get(string) voteMap.get voteMap string max {
				System.out.println(string);
			} System.out.println(string) System.out.println System.out System System.out string String[] args args 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> voteMap = new TreeMap<String, Integer>();

		for (int i = 0; i < N; i++) {
			String item = sc.next();

			if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			}
		}

		for (String string : voteMap.keySet()) {
			if (voteMap.get(string) == max) {
				System.out.println(string);
			}
		}
	}
} 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> voteMap = new TreeMap<String, Integer>();

		for (int i = 0; i < N; i++) {
			String item = sc.next();

			if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			}
		}

		for (String string : voteMap.keySet()) {
			if (voteMap.get(string) == max) {
				System.out.println(string);
			}
		}
	}
} 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();
		int max = 0;
		Map<String, Integer> voteMap = new TreeMap<String, Integer>();

		for (int i = 0; i < N; i++) {
			String item = sc.next();

			if (voteMap.containsKey(item)) {
				voteMap.put(item, voteMap.get(item) + 1);
				if (max < voteMap.get(item)) {
					max = voteMap.get(item);
				}
			}else {
				voteMap.put(item, 0);
			}
		}

		for (String string : voteMap.keySet()) {
			if (voteMap.get(string) == max) {
				System.out.println(string);
			}
		}
	}
}