import java.util.Arrays;
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;
		n= sc.nextInt();
		int max = 1;
		Map<String,Integer> map = new TreeMap<String,Integer>();
		for (int i=0;i<n;i++) {
			String s = sc.next();
			if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			}
		}
		Object[] array = map.keySet().toArray();
		Arrays.sort(array);
		for (int i=0;i<array.length;i++) {
			if (map.get(array[i])== max) {
				System.out.println(array[i]);
			}
		}
	}


} import java.util.Arrays; Arrays java.util 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;
		n= sc.nextInt();
		int max = 1;
		Map<String,Integer> map = new TreeMap<String,Integer>();
		for (int i=0;i<n;i++) {
			String s = sc.next();
			if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			}
		}
		Object[] array = map.keySet().toArray();
		Arrays.sort(array);
		for (int i=0;i<array.length;i++) {
			if (map.get(array[i])== max) {
				System.out.println(array[i]);
			}
		}
	}


} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n= sc.nextInt();
		int max = 1;
		Map<String,Integer> map = new TreeMap<String,Integer>();
		for (int i=0;i<n;i++) {
			String s = sc.next();
			if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			}
		}
		Object[] array = map.keySet().toArray();
		Arrays.sort(array);
		for (int i=0;i<array.length;i++) {
			if (map.get(array[i])== max) {
				System.out.println(array[i]);
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n;
		n= sc.nextInt();
		int max = 1;
		Map<String,Integer> map = new TreeMap<String,Integer>();
		for (int i=0;i<n;i++) {
			String s = sc.next();
			if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			}
		}
		Object[] array = map.keySet().toArray();
		Arrays.sort(array);
		for (int i=0;i<array.length;i++) {
			if (map.get(array[i])== max) {
				System.out.println(array[i]);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n; n n= sc.nextInt() n sc.nextInt() sc.nextInt sc int max = 1; max 1 Map<String,Integer> map = new TreeMap<String,Integer>(); map new TreeMap<String,Integer>() for (int i=0;i<n;i++) {
			String s = sc.next();
			if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			String s = sc.next();
			if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			}
		} {
			String s = sc.next();
			if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			}
		} String s = sc.next(); s sc.next() sc.next sc if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			} map.containsKey(s)==false map.containsKey(s) map.containsKey map s false {
				map.put(s, 1);
			} map.put(s, 1) map.put map s 1 {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			} Integer in = map.get(s); in map.get(s) map.get map s in = in+1 in in+1 in 1 if (in>max) {
					max = in;
				} in>max in max {
					max = in;
				} max = in max in map.put(s, in) map.put map s in Object[] array = map.keySet().toArray(); array map.keySet().toArray() map.keySet().toArray map.keySet() map.keySet map Arrays.sort(array) Arrays.sort Arrays array for (int i=0;i<array.length;i++) {
			if (map.get(array[i])== max) {
				System.out.println(array[i]);
			}
		} int i=0; int i=0; i 0 i<array.length i array.length array array.length i++ i++ i {
			if (map.get(array[i])== max) {
				System.out.println(array[i]);
			}
		} {
			if (map.get(array[i])== max) {
				System.out.println(array[i]);
			}
		} if (map.get(array[i])== max) {
				System.out.println(array[i]);
			} map.get(array[i])== max map.get(array[i]) map.get map array[i] array i max {
				System.out.println(array[i]);
			} System.out.println(array[i]) System.out.println System.out System System.out array[i] array i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n= sc.nextInt();
		int max = 1;
		Map<String,Integer> map = new TreeMap<String,Integer>();
		for (int i=0;i<n;i++) {
			String s = sc.next();
			if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			}
		}
		Object[] array = map.keySet().toArray();
		Arrays.sort(array);
		for (int i=0;i<array.length;i++) {
			if (map.get(array[i])== max) {
				System.out.println(array[i]);
			}
		}
	}


} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n= sc.nextInt();
		int max = 1;
		Map<String,Integer> map = new TreeMap<String,Integer>();
		for (int i=0;i<n;i++) {
			String s = sc.next();
			if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			}
		}
		Object[] array = map.keySet().toArray();
		Arrays.sort(array);
		for (int i=0;i<array.length;i++) {
			if (map.get(array[i])== max) {
				System.out.println(array[i]);
			}
		}
	}


} Main
import java.util.Arrays;
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;
		n= sc.nextInt();
		int max = 1;
		Map<String,Integer> map = new TreeMap<String,Integer>();
		for (int i=0;i<n;i++) {
			String s = sc.next();
			if (map.containsKey(s)==false) {
				map.put(s, 1);
			} else {
				Integer in = map.get(s);
				in = in+1;
				if (in>max) {
					max = in;
				}
				map.put(s, in);
			}
		}
		Object[] array = map.keySet().toArray();
		Arrays.sort(array);
		for (int i=0;i<array.length;i++) {
			if (map.get(array[i])== max) {
				System.out.println(array[i]);
			}
		}
	}


}