import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Map;
import java.util.TreeMap;

public class Main {
	public static void main(String[] args) throws Exception {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int n = Integer.parseInt(br.readLine());
			Map<String, Integer> map = new TreeMap<>();
			int max = 0;
			for (int i = 0; i < n; i++) {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			}
			PrintWriter out = new PrintWriter(System.out);
			for (String key : map.keySet()) {
				if (map.get(key) == max) {
					out.println(key);
				}
			}
			out.flush();
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Map; Map java.util import java.util.TreeMap; TreeMap java.util public class Main {
	public static void main(String[] args) throws Exception {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int n = Integer.parseInt(br.readLine());
			Map<String, Integer> map = new TreeMap<>();
			int max = 0;
			for (int i = 0; i < n; i++) {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			}
			PrintWriter out = new PrintWriter(System.out);
			for (String key : map.keySet()) {
				if (map.get(key) == max) {
					out.println(key);
				}
			}
			out.flush();
		}
	}
} Main public static void main(String[] args) throws Exception {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int n = Integer.parseInt(br.readLine());
			Map<String, Integer> map = new TreeMap<>();
			int max = 0;
			for (int i = 0; i < n; i++) {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			}
			PrintWriter out = new PrintWriter(System.out);
			for (String key : map.keySet()) {
				if (map.get(key) == max) {
					out.println(key);
				}
			}
			out.flush();
		}
	} main {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int n = Integer.parseInt(br.readLine());
			Map<String, Integer> map = new TreeMap<>();
			int max = 0;
			for (int i = 0; i < n; i++) {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			}
			PrintWriter out = new PrintWriter(System.out);
			for (String key : map.keySet()) {
				if (map.get(key) == max) {
					out.println(key);
				}
			}
			out.flush();
		}
	} try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int n = Integer.parseInt(br.readLine());
			Map<String, Integer> map = new TreeMap<>();
			int max = 0;
			for (int i = 0; i < n; i++) {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			}
			PrintWriter out = new PrintWriter(System.out);
			for (String key : map.keySet()) {
				if (map.get(key) == max) {
					out.println(key);
				}
			}
			out.flush();
		} {
			int n = Integer.parseInt(br.readLine());
			Map<String, Integer> map = new TreeMap<>();
			int max = 0;
			for (int i = 0; i < n; i++) {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			}
			PrintWriter out = new PrintWriter(System.out);
			for (String key : map.keySet()) {
				if (map.get(key) == max) {
					out.println(key);
				}
			}
			out.flush();
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br Map<String, Integer> map = new TreeMap<>(); map new TreeMap<>() int max = 0; max 0 for (int i = 0; i < n; i++) {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			} {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			} String s = br.readLine(); s br.readLine() br.readLine br int val = map.containsKey(s) ? map.get(s) + 1 : 1; val map.containsKey(s) ? map.get(s) + 1 : 1 map.containsKey(s) map.containsKey map s map.get(s) + 1 map.get(s) map.get map s 1 1 map.put(s, val) map.put map s val max = Math.max(max, val) max Math.max(max, val) Math.max Math max val PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) for (String key : map.keySet()) {
				if (map.get(key) == max) {
					out.println(key);
				}
			} String key map.keySet() map.keySet map {
				if (map.get(key) == max) {
					out.println(key);
				}
			} {
				if (map.get(key) == max) {
					out.println(key);
				}
			} if (map.get(key) == max) {
					out.println(key);
				} map.get(key) == max map.get(key) map.get map key max {
					out.println(key);
				} out.println(key) out.println out key out.flush() out.flush out String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int n = Integer.parseInt(br.readLine());
			Map<String, Integer> map = new TreeMap<>();
			int max = 0;
			for (int i = 0; i < n; i++) {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			}
			PrintWriter out = new PrintWriter(System.out);
			for (String key : map.keySet()) {
				if (map.get(key) == max) {
					out.println(key);
				}
			}
			out.flush();
		}
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int n = Integer.parseInt(br.readLine());
			Map<String, Integer> map = new TreeMap<>();
			int max = 0;
			for (int i = 0; i < n; i++) {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			}
			PrintWriter out = new PrintWriter(System.out);
			for (String key : map.keySet()) {
				if (map.get(key) == max) {
					out.println(key);
				}
			}
			out.flush();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Map;
import java.util.TreeMap;

public class Main {
	public static void main(String[] args) throws Exception {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int n = Integer.parseInt(br.readLine());
			Map<String, Integer> map = new TreeMap<>();
			int max = 0;
			for (int i = 0; i < n; i++) {
				String s = br.readLine();
				int val = map.containsKey(s) ? map.get(s) + 1 : 1;
				map.put(s, val);
				max = Math.max(max, val);
			}
			PrintWriter out = new PrintWriter(System.out);
			for (String key : map.keySet()) {
				if (map.get(key) == max) {
					out.println(key);
				}
			}
			out.flush();
		}
	}
}