import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
 

//result = Math.pow(num1, num3)
//StringBuffer str = new StringBuffer(hoge1);
//String hoge2 = str.reverse().toString();
public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	//static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	
	
	public static void main(String[] args) {
	int n =sc.nextInt();
	Map<String, Integer> map = new HashMap<String, Integer>(n);
	ArrayList<String> cc = new ArrayList<>(n);
	int max =0;
	String tmp;
	for(int i=0;i<n;i++) {
		tmp=sc.next();
		if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		}
		if(max<map.get(tmp)) {
			max=map.get(tmp);
		}
	
	}
	Collections.sort(cc);
	for(String a:cc) {
		if(map.get(a)==max) {
			p(a);
		}
	}
	
 }
} import java.util.ArrayList; ArrayList java.util import java.util.Collection; Collection java.util import java.util.Collections; Collections java.util import java.util.Comparator; Comparator java.util import java.util.HashMap; HashMap java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	//static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	
	
	public static void main(String[] args) {
	int n =sc.nextInt();
	Map<String, Integer> map = new HashMap<String, Integer>(n);
	ArrayList<String> cc = new ArrayList<>(n);
	int max =0;
	String tmp;
	for(int i=0;i<n;i++) {
		tmp=sc.next();
		if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		}
		if(max<map.get(tmp)) {
			max=map.get(tmp);
		}
	
	}
	Collections.sort(cc);
	for(String a:cc) {
		if(map.get(a)==max) {
			p(a);
		}
	}
	
 }
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static void p(String ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans String ans ans static void p(int ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans int ans ans static void p(long ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans long ans ans public static void main(String[] args) {
	int n =sc.nextInt();
	Map<String, Integer> map = new HashMap<String, Integer>(n);
	ArrayList<String> cc = new ArrayList<>(n);
	int max =0;
	String tmp;
	for(int i=0;i<n;i++) {
		tmp=sc.next();
		if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		}
		if(max<map.get(tmp)) {
			max=map.get(tmp);
		}
	
	}
	Collections.sort(cc);
	for(String a:cc) {
		if(map.get(a)==max) {
			p(a);
		}
	}
	
 } main {
	int n =sc.nextInt();
	Map<String, Integer> map = new HashMap<String, Integer>(n);
	ArrayList<String> cc = new ArrayList<>(n);
	int max =0;
	String tmp;
	for(int i=0;i<n;i++) {
		tmp=sc.next();
		if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		}
		if(max<map.get(tmp)) {
			max=map.get(tmp);
		}
	
	}
	Collections.sort(cc);
	for(String a:cc) {
		if(map.get(a)==max) {
			p(a);
		}
	}
	
 } int n =sc.nextInt(); n sc.nextInt() sc.nextInt sc Map<String, Integer> map = new HashMap<String, Integer>(n); map new HashMap<String, Integer>(n) ArrayList<String> cc = new ArrayList<>(n); cc new ArrayList<>(n) int max =0; max 0 String tmp; tmp for(int i=0;i<n;i++) {
		tmp=sc.next();
		if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		}
		if(max<map.get(tmp)) {
			max=map.get(tmp);
		}
	
	} int i=0; int i=0; i 0 i<n i n i++ i++ i {
		tmp=sc.next();
		if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		}
		if(max<map.get(tmp)) {
			max=map.get(tmp);
		}
	
	} {
		tmp=sc.next();
		if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		}
		if(max<map.get(tmp)) {
			max=map.get(tmp);
		}
	
	} tmp=sc.next() tmp sc.next() sc.next sc if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		} map.containsKey(tmp) map.containsKey map tmp {
			map.put(tmp,map.get(tmp)+1);
		} map.put(tmp,map.get(tmp)+1) map.put map tmp map.get(tmp)+1 map.get(tmp) map.get map tmp 1 {
			map.put(tmp,1);		
			cc.add(tmp);
		} map.put(tmp,1) map.put map tmp 1 cc.add(tmp) cc.add cc tmp if(max<map.get(tmp)) {
			max=map.get(tmp);
		} max<map.get(tmp) max map.get(tmp) map.get map tmp {
			max=map.get(tmp);
		} max=map.get(tmp) max map.get(tmp) map.get map tmp Collections.sort(cc) Collections.sort Collections cc for(String a:cc) {
		if(map.get(a)==max) {
			p(a);
		}
	} String a cc {
		if(map.get(a)==max) {
			p(a);
		}
	} {
		if(map.get(a)==max) {
			p(a);
		}
	} if(map.get(a)==max) {
			p(a);
		} map.get(a)==max map.get(a) map.get map a max {
			p(a);
		} p(a) p a String[] args args public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	//static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	
	
	public static void main(String[] args) {
	int n =sc.nextInt();
	Map<String, Integer> map = new HashMap<String, Integer>(n);
	ArrayList<String> cc = new ArrayList<>(n);
	int max =0;
	String tmp;
	for(int i=0;i<n;i++) {
		tmp=sc.next();
		if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		}
		if(max<map.get(tmp)) {
			max=map.get(tmp);
		}
	
	}
	Collections.sort(cc);
	for(String a:cc) {
		if(map.get(a)==max) {
			p(a);
		}
	}
	
 }
} public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	//static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	
	
	public static void main(String[] args) {
	int n =sc.nextInt();
	Map<String, Integer> map = new HashMap<String, Integer>(n);
	ArrayList<String> cc = new ArrayList<>(n);
	int max =0;
	String tmp;
	for(int i=0;i<n;i++) {
		tmp=sc.next();
		if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		}
		if(max<map.get(tmp)) {
			max=map.get(tmp);
		}
	
	}
	Collections.sort(cc);
	for(String a:cc) {
		if(map.get(a)==max) {
			p(a);
		}
	}
	
 }
} Main
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
 

//result = Math.pow(num1, num3)
//StringBuffer str = new StringBuffer(hoge1);
//String hoge2 = str.reverse().toString();
public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	//static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	
	
	public static void main(String[] args) {
	int n =sc.nextInt();
	Map<String, Integer> map = new HashMap<String, Integer>(n);
	ArrayList<String> cc = new ArrayList<>(n);
	int max =0;
	String tmp;
	for(int i=0;i<n;i++) {
		tmp=sc.next();
		if(map.containsKey(tmp)) {
			map.put(tmp,map.get(tmp)+1);
		}else {
			map.put(tmp,1);		
			cc.add(tmp);
		}
		if(max<map.get(tmp)) {
			max=map.get(tmp);
		}
	
	}
	Collections.sort(cc);
	for(String a:cc) {
		if(map.get(a)==max) {
			p(a);
		}
	}
	
 }
}