import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.TreeMap;

public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine());

		TreeMap<String, Integer> map = new TreeMap<>();
		HashSet<String> set = new HashSet<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			}
		}

		for (String s : map.keySet()) {
			if (map.get(s) == max) {
				System.out.println(s);
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.HashSet; HashSet java.util import java.util.TreeMap; TreeMap java.util public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine());

		TreeMap<String, Integer> map = new TreeMap<>();
		HashSet<String> set = new HashSet<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			}
		}

		for (String s : map.keySet()) {
			if (map.get(s) == max) {
				System.out.println(s);
			}
		}
	}
} Main public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine());

		TreeMap<String, Integer> map = new TreeMap<>();
		HashSet<String> set = new HashSet<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			}
		}

		for (String s : map.keySet()) {
			if (map.get(s) == max) {
				System.out.println(s);
			}
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine());

		TreeMap<String, Integer> map = new TreeMap<>();
		HashSet<String> set = new HashSet<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			}
		}

		for (String s : map.keySet()) {
			if (map.get(s) == max) {
				System.out.println(s);
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br 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 TreeMap<String, Integer> map = new TreeMap<>(); map new TreeMap<>() HashSet<String> set = new HashSet<>(); set new HashSet<>() int max = 0; max 0 for (int i = 0; i < n; i++) {
			String str = br.readLine();
			if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String str = br.readLine();
			if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			}
		} {
			String str = br.readLine();
			if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			}
		} String str = br.readLine(); str br.readLine() br.readLine br if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			} map.containsKey(str) map.containsKey map str {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} map.put(str, map.get(str) + 1) map.put map str map.get(str) + 1 map.get(str) map.get map str 1 max = Math.max(max, map.get(str)) max Math.max(max, map.get(str)) Math.max Math max map.get(str) map.get map str {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			} map.put(str, 1) map.put map str 1 max = Math.max(max, map.get(str)) max Math.max(max, map.get(str)) Math.max Math max map.get(str) map.get map str for (String s : map.keySet()) {
			if (map.get(s) == max) {
				System.out.println(s);
			}
		} String s map.keySet() map.keySet map {
			if (map.get(s) == max) {
				System.out.println(s);
			}
		} {
			if (map.get(s) == max) {
				System.out.println(s);
			}
		} if (map.get(s) == max) {
				System.out.println(s);
			} map.get(s) == max map.get(s) map.get map s max {
				System.out.println(s);
			} System.out.println(s) System.out.println System.out System System.out s String args[] args public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine());

		TreeMap<String, Integer> map = new TreeMap<>();
		HashSet<String> set = new HashSet<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			}
		}

		for (String s : map.keySet()) {
			if (map.get(s) == max) {
				System.out.println(s);
			}
		}
	}
} public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine());

		TreeMap<String, Integer> map = new TreeMap<>();
		HashSet<String> set = new HashSet<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			}
		}

		for (String s : map.keySet()) {
			if (map.get(s) == max) {
				System.out.println(s);
			}
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.TreeMap;

public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine());

		TreeMap<String, Integer> map = new TreeMap<>();
		HashSet<String> set = new HashSet<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			if (map.containsKey(str)) {
				map.put(str, map.get(str) + 1);
				max = Math.max(max, map.get(str));
			} else {
				map.put(str, 1);
				max = Math.max(max, map.get(str));
			}
		}

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