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

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String[] s = new String[n];

		int i;
		TreeMap<String, Integer> map = new TreeMap<>();
		for(i = 0; i < n; i++) {
			s[i] = scan.next();
			if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1);
		}
		int max = Integer.MIN_VALUE;
		for(int a: map.values()) {
			if(max < a)
				max = a;
		}
		for(Entry<String, Integer> temp : map.entrySet()) {
			if(temp.getValue() == max)
				System.out.println(temp.getKey());
		}
	}
} import java.util.Map.Entry; Entry java.util.Map import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String[] s = new String[n];

		int i;
		TreeMap<String, Integer> map = new TreeMap<>();
		for(i = 0; i < n; i++) {
			s[i] = scan.next();
			if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1);
		}
		int max = Integer.MIN_VALUE;
		for(int a: map.values()) {
			if(max < a)
				max = a;
		}
		for(Entry<String, Integer> temp : map.entrySet()) {
			if(temp.getValue() == max)
				System.out.println(temp.getKey());
		}
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String[] s = new String[n];

		int i;
		TreeMap<String, Integer> map = new TreeMap<>();
		for(i = 0; i < n; i++) {
			s[i] = scan.next();
			if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1);
		}
		int max = Integer.MIN_VALUE;
		for(int a: map.values()) {
			if(max < a)
				max = a;
		}
		for(Entry<String, Integer> temp : map.entrySet()) {
			if(temp.getValue() == max)
				System.out.println(temp.getKey());
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String[] s = new String[n];

		int i;
		TreeMap<String, Integer> map = new TreeMap<>();
		for(i = 0; i < n; i++) {
			s[i] = scan.next();
			if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1);
		}
		int max = Integer.MIN_VALUE;
		for(int a: map.values()) {
			if(max < a)
				max = a;
		}
		for(Entry<String, Integer> temp : map.entrySet()) {
			if(temp.getValue() == max)
				System.out.println(temp.getKey());
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan String[] s = new String[n]; s new String[n] n int i; i TreeMap<String, Integer> map = new TreeMap<>(); map new TreeMap<>() for(i = 0; i < n; i++) {
			s[i] = scan.next();
			if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1);
		} i = 0; i = 0 i 0 i < n i n i++ i++ i {
			s[i] = scan.next();
			if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1);
		} {
			s[i] = scan.next();
			if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1);
		} s[i] = scan.next() s[i] s i scan.next() scan.next scan if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1); map.containsKey(s[i]) map.containsKey map s[i] s i map.put(s[i], map.get(s[i]) + 1) map.put map s[i] s i map.get(s[i]) + 1 map.get(s[i]) map.get map s[i] s i 1 map.put(s[i], 1) map.put map s[i] s i 1 int max = Integer.MIN_VALUE; max Integer.MIN_VALUE Integer Integer.MIN_VALUE for(int a: map.values()) {
			if(max < a)
				max = a;
		} int a map.values() map.values map {
			if(max < a)
				max = a;
		} {
			if(max < a)
				max = a;
		} if(max < a)
				max = a; max < a max a max = a max a for(Entry<String, Integer> temp : map.entrySet()) {
			if(temp.getValue() == max)
				System.out.println(temp.getKey());
		} Entry<String, Integer> temp map.entrySet() map.entrySet map {
			if(temp.getValue() == max)
				System.out.println(temp.getKey());
		} {
			if(temp.getValue() == max)
				System.out.println(temp.getKey());
		} if(temp.getValue() == max)
				System.out.println(temp.getKey()); temp.getValue() == max temp.getValue() temp.getValue temp max System.out.println(temp.getKey()) System.out.println System.out System System.out temp.getKey() temp.getKey temp String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String[] s = new String[n];

		int i;
		TreeMap<String, Integer> map = new TreeMap<>();
		for(i = 0; i < n; i++) {
			s[i] = scan.next();
			if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1);
		}
		int max = Integer.MIN_VALUE;
		for(int a: map.values()) {
			if(max < a)
				max = a;
		}
		for(Entry<String, Integer> temp : map.entrySet()) {
			if(temp.getValue() == max)
				System.out.println(temp.getKey());
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String[] s = new String[n];

		int i;
		TreeMap<String, Integer> map = new TreeMap<>();
		for(i = 0; i < n; i++) {
			s[i] = scan.next();
			if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1);
		}
		int max = Integer.MIN_VALUE;
		for(int a: map.values()) {
			if(max < a)
				max = a;
		}
		for(Entry<String, Integer> temp : map.entrySet()) {
			if(temp.getValue() == max)
				System.out.println(temp.getKey());
		}
	}
} Main
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.TreeMap;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String[] s = new String[n];

		int i;
		TreeMap<String, Integer> map = new TreeMap<>();
		for(i = 0; i < n; i++) {
			s[i] = scan.next();
			if(map.containsKey(s[i]))
				map.put(s[i], map.get(s[i]) + 1);
			else
				map.put(s[i], 1);
		}
		int max = Integer.MIN_VALUE;
		for(int a: map.values()) {
			if(max < a)
				max = a;
		}
		for(Entry<String, Integer> temp : map.entrySet()) {
			if(temp.getValue() == max)
				System.out.println(temp.getKey());
		}
	}
}