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

public class Main {

	public static int N;
	public static Map<String, Integer> wordCount = new TreeMap<String, Integer>();

	public static void main(String[] args) {
		init();
		int max = 0;
		for (int v : wordCount.values()) {
			if (v > max) {
				max = v;
			}
		}
		for (String w : wordCount.keySet()) {
			if (wordCount.get(w) == max) {
				System.out.println(w);
			}
		}
	}

	public static void init() {
		Scanner sc = new Scanner(System.in);
		try {
			N = sc.nextInt();
			for (int i = 0; i < N; i++) {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

} 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 int N;
	public static Map<String, Integer> wordCount = new TreeMap<String, Integer>();

	public static void main(String[] args) {
		init();
		int max = 0;
		for (int v : wordCount.values()) {
			if (v > max) {
				max = v;
			}
		}
		for (String w : wordCount.keySet()) {
			if (wordCount.get(w) == max) {
				System.out.println(w);
			}
		}
	}

	public static void init() {
		Scanner sc = new Scanner(System.in);
		try {
			N = sc.nextInt();
			for (int i = 0; i < N; i++) {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

} Main public static int N; N public static Map<String, Integer> wordCount = new TreeMap<String, Integer>(); wordCount new TreeMap<String, Integer>() public static void main(String[] args) {
		init();
		int max = 0;
		for (int v : wordCount.values()) {
			if (v > max) {
				max = v;
			}
		}
		for (String w : wordCount.keySet()) {
			if (wordCount.get(w) == max) {
				System.out.println(w);
			}
		}
	} main {
		init();
		int max = 0;
		for (int v : wordCount.values()) {
			if (v > max) {
				max = v;
			}
		}
		for (String w : wordCount.keySet()) {
			if (wordCount.get(w) == max) {
				System.out.println(w);
			}
		}
	} init() init int max = 0; max 0 for (int v : wordCount.values()) {
			if (v > max) {
				max = v;
			}
		} int v wordCount.values() wordCount.values wordCount {
			if (v > max) {
				max = v;
			}
		} {
			if (v > max) {
				max = v;
			}
		} if (v > max) {
				max = v;
			} v > max v max {
				max = v;
			} max = v max v for (String w : wordCount.keySet()) {
			if (wordCount.get(w) == max) {
				System.out.println(w);
			}
		} String w wordCount.keySet() wordCount.keySet wordCount {
			if (wordCount.get(w) == max) {
				System.out.println(w);
			}
		} {
			if (wordCount.get(w) == max) {
				System.out.println(w);
			}
		} if (wordCount.get(w) == max) {
				System.out.println(w);
			} wordCount.get(w) == max wordCount.get(w) wordCount.get wordCount w max {
				System.out.println(w);
			} System.out.println(w) System.out.println System.out System System.out w String[] args args public static void init() {
		Scanner sc = new Scanner(System.in);
		try {
			N = sc.nextInt();
			for (int i = 0; i < N; i++) {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	} init {
		Scanner sc = new Scanner(System.in);
		try {
			N = sc.nextInt();
			for (int i = 0; i < N; i++) {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
			N = sc.nextInt();
			for (int i = 0; i < N; i++) {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		} Exception e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			N = sc.nextInt();
			for (int i = 0; i < N; i++) {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			}
		} N = sc.nextInt() N sc.nextInt() sc.nextInt sc for (int i = 0; i < N; i++) {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			} {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			} String w = sc.next(); w sc.next() sc.next sc if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				} wordCount.containsKey(w) wordCount.containsKey wordCount w {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} int count = wordCount.get(w); count wordCount.get(w) wordCount.get wordCount w wordCount.put(w, ++count) wordCount.put wordCount w ++count count {
					wordCount.put(w, 1);
				} wordCount.put(w, 1) wordCount.put wordCount w 1 public class Main {

	public static int N;
	public static Map<String, Integer> wordCount = new TreeMap<String, Integer>();

	public static void main(String[] args) {
		init();
		int max = 0;
		for (int v : wordCount.values()) {
			if (v > max) {
				max = v;
			}
		}
		for (String w : wordCount.keySet()) {
			if (wordCount.get(w) == max) {
				System.out.println(w);
			}
		}
	}

	public static void init() {
		Scanner sc = new Scanner(System.in);
		try {
			N = sc.nextInt();
			for (int i = 0; i < N; i++) {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

} public class Main {

	public static int N;
	public static Map<String, Integer> wordCount = new TreeMap<String, Integer>();

	public static void main(String[] args) {
		init();
		int max = 0;
		for (int v : wordCount.values()) {
			if (v > max) {
				max = v;
			}
		}
		for (String w : wordCount.keySet()) {
			if (wordCount.get(w) == max) {
				System.out.println(w);
			}
		}
	}

	public static void init() {
		Scanner sc = new Scanner(System.in);
		try {
			N = sc.nextInt();
			for (int i = 0; i < N; i++) {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

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

public class Main {

	public static int N;
	public static Map<String, Integer> wordCount = new TreeMap<String, Integer>();

	public static void main(String[] args) {
		init();
		int max = 0;
		for (int v : wordCount.values()) {
			if (v > max) {
				max = v;
			}
		}
		for (String w : wordCount.keySet()) {
			if (wordCount.get(w) == max) {
				System.out.println(w);
			}
		}
	}

	public static void init() {
		Scanner sc = new Scanner(System.in);
		try {
			N = sc.nextInt();
			for (int i = 0; i < N; i++) {
				String w = sc.next();
				if (wordCount.containsKey(w)) {
					int count = wordCount.get(w);
					wordCount.put(w, ++count);
				} else {
					wordCount.put(w, 1);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
