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

public class Main {

	public static void main(String[] args) {
		TreeMap<String, Integer> map = new TreeMap<String, Integer>();
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int max = 0;
		for(int i = 0; i < n; i++) {
			String s = scan.next();
			if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			}
		}
		for(String val: map.keySet()) {
			if(map.get(val) == max)	System.out.println(val);
		}
		scan.close();
	}

} import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {

	public static void main(String[] args) {
		TreeMap<String, Integer> map = new TreeMap<String, Integer>();
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int max = 0;
		for(int i = 0; i < n; i++) {
			String s = scan.next();
			if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			}
		}
		for(String val: map.keySet()) {
			if(map.get(val) == max)	System.out.println(val);
		}
		scan.close();
	}

} Main public static void main(String[] args) {
		TreeMap<String, Integer> map = new TreeMap<String, Integer>();
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int max = 0;
		for(int i = 0; i < n; i++) {
			String s = scan.next();
			if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			}
		}
		for(String val: map.keySet()) {
			if(map.get(val) == max)	System.out.println(val);
		}
		scan.close();
	} main {
		TreeMap<String, Integer> map = new TreeMap<String, Integer>();
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int max = 0;
		for(int i = 0; i < n; i++) {
			String s = scan.next();
			if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			}
		}
		for(String val: map.keySet()) {
			if(map.get(val) == max)	System.out.println(val);
		}
		scan.close();
	} TreeMap<String, Integer> map = new TreeMap<String, Integer>(); map new TreeMap<String, Integer>() Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int max = 0; max 0 for(int i = 0; i < n; i++) {
			String s = scan.next();
			if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String s = scan.next();
			if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			}
		} {
			String s = scan.next();
			if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			}
		} String s = scan.next(); s scan.next() scan.next scan if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			} map.containsKey(s) map.containsKey map s {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} int num = map.get(s) + 1; num map.get(s) + 1 map.get(s) map.get map s 1 map.put(s, num) map.put map s num if(max < num) max = num; max < num max num max = num max num {
				map.put(s, 1);
				if(max < 1) max = 1;
			} map.put(s, 1) map.put map s 1 if(max < 1) max = 1; max < 1 max 1 max = 1 max 1 for(String val: map.keySet()) {
			if(map.get(val) == max)	System.out.println(val);
		} String val map.keySet() map.keySet map {
			if(map.get(val) == max)	System.out.println(val);
		} {
			if(map.get(val) == max)	System.out.println(val);
		} if(map.get(val) == max)	System.out.println(val); map.get(val) == max map.get(val) map.get map val max System.out.println(val) System.out.println System.out System System.out val scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		TreeMap<String, Integer> map = new TreeMap<String, Integer>();
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int max = 0;
		for(int i = 0; i < n; i++) {
			String s = scan.next();
			if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			}
		}
		for(String val: map.keySet()) {
			if(map.get(val) == max)	System.out.println(val);
		}
		scan.close();
	}

} public class Main {

	public static void main(String[] args) {
		TreeMap<String, Integer> map = new TreeMap<String, Integer>();
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int max = 0;
		for(int i = 0; i < n; i++) {
			String s = scan.next();
			if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			}
		}
		for(String val: map.keySet()) {
			if(map.get(val) == max)	System.out.println(val);
		}
		scan.close();
	}

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

public class Main {

	public static void main(String[] args) {
		TreeMap<String, Integer> map = new TreeMap<String, Integer>();
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int max = 0;
		for(int i = 0; i < n; i++) {
			String s = scan.next();
			if(map.containsKey(s)) {
				int num = map.get(s) + 1;
				map.put(s, num);
				if(max < num) max = num;
			} else {
				map.put(s, 1);
				if(max < 1) max = 1;
			}
		}
		for(String val: map.keySet()) {
			if(map.get(val) == max)	System.out.println(val);
		}
		scan.close();
	}

}
