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

public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		Map<String, Integer> map = new TreeMap<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String z = s.next();
			if (map.containsKey(z)) {
				int v = map.get(z) + 1;
				max = Math.max(max, v);
				map.put(z, v);
			}else {
				map.put(z, 1);
				max = Math.max(max, 1);
			}
		}
		for(String k : map.keySet()) {
			if (map.get(k) == max) {
				System.out.println(k);
			}
		}
	}
	
	
} 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 s = new Scanner(System.in);
		int n = s.nextInt();
		Map<String, Integer> map = new TreeMap<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String z = s.next();
			if (map.containsKey(z)) {
				int v = map.get(z) + 1;
				max = Math.max(max, v);
				map.put(z, v);
			}else {
				map.put(z, 1);
				max = Math.max(max, 1);
			}
		}
		for(String k : map.keySet()) {
			if (map.get(k) == max) {
				System.out.println(k);
			}
		}
	}
	
	
} Main public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		Map<String, Integer> map = new TreeMap<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String z = s.next();
			if (map.containsKey(z)) {
				int v = map.get(z) + 1;
				max = Math.max(max, v);
				map.put(z, v);
			}else {
				map.put(z, 1);
				max = Math.max(max, 1);
			}
		}
		for(String k : map.keySet()) {
			if (map.get(k) == max) {
				System.out.println(k);
			}
		}
	} main {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		Map<String, Integer> map = new TreeMap<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String z = s.next();
			if (map.containsKey(z)) {
				int v = map.get(z) + 1;
				max = Math.max(max, v);
				map.put(z, v);
			}else {
				map.put(z, 1);
				max = Math.max(max, 1);
			}
		}
		for(String k : map.keySet()) {
			if (map.get(k) == max) {
				System.out.println(k);
			}
		}
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s Map<String, Integer> map = new TreeMap<>(); map new TreeMap<>() int max = 0; max 0 for (int i = 0; i < n; i++) {
			String z = s.next();
			if (map.containsKey(z)) {
				int v = map.get(z) + 1;
				max = Math.max(max, v);
				map.put(z, v);
			}else {
				map.put(z, 1);
				max = Math.max(max, 1);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String z = s.next();
			if (map.containsKey(z)) {
				int v = map.get(z) + 1;
				max = Math.max(max, v);
				map.put(z, v);
			}else {
				map.put(z, 1);
				max = Math.max(max, 1);
			}
		} {
			String z = s.next();
			if (map.containsKey(z)) {
				int v = map.get(z) + 1;
				max = Math.max(max, v);
				map.put(z, v);
			}else {
				map.put(z, 1);
				max = Math.max(max, 1);
			}
		} String z = s.next(); z s.next() s.next s if (map.containsKey(z)) {
				int v = map.get(z) + 1;
				max = Math.max(max, v);
				map.put(z, v);
			}else {
				map.put(z, 1);
				max = Math.max(max, 1);
			} map.containsKey(z) map.containsKey map z {
				int v = map.get(z) + 1;
				max = Math.max(max, v);
				map.put(z, v);
			} int v = map.get(z) + 1; v map.get(z) + 1 map.get(z) map.get map z 1 max = Math.max(max, v) max Math.max(max, v) Math.max Math max v map.put(z, v) map.put map z v {
				map.put(z, 1);
				max = Math.max(max, 1);
			} map.put(z, 1) map.put map z 1 max = Math.max(max, 1) max Math.max(max, 1) Math.max Math max 1 for(String k : map.keySet()) {
			if (map.get(k) == max) {
				System.out.println(k);
			}
		} String k map.keySet() map.keySet map {
			if (map.get(k) == max) {
				System.out.println(k);
			}
		} {
			if (map.get(k) == max) {
				System.out.println(k);
			}
		} if (map.get(k) == max) {
				System.out.println(k);
			} map.get(k) == max map.get(k) map.get map k max {
				System.out.println(k);
			} System.out.println(k) System.out.println System.out System System.out k String[] args args public class Main {

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

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		Map<String, Integer> map = new TreeMap<>();
		int max = 0;
		for (int i = 0; i < n; i++) {
			String z = s.next();
			if (map.containsKey(z)) {
				int v = map.get(z) + 1;
				max = Math.max(max, v);
				map.put(z, v);
			}else {
				map.put(z, 1);
				max = Math.max(max, 1);
			}
		}
		for(String k : map.keySet()) {
			if (map.get(k) == max) {
				System.out.println(k);
			}
		}
	}
	
	
} Main
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {

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