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