import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
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;
		Map<String, Integer> poll = new TreeMap<String, Integer>();
		int max = 0;
		
		for(int i = 0; i < n; i++){
			s = scan.next();
			
			if(poll.containsKey(s)){
				poll.put(s, poll.get(s)+1);
			}
			else{
				poll.put(s, 1);
			}
		}
		
        for (String key : poll.keySet()) {
        	if(max < poll.get(key)){
        		max = poll.get(key);
        	}
		}
        
        Object[] mapkey = poll.keySet().toArray();
        Arrays.sort(mapkey);
        
        for (String key : poll.keySet()) {
        	if(poll.get(key)== max){
    			System.out.println(key);        		
        	}
		}
		
	}
} import java.util.Arrays; Arrays java.util import java.util.HashMap; HashMap 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 scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s;
		Map<String, Integer> poll = new TreeMap<String, Integer>();
		int max = 0;
		
		for(int i = 0; i < n; i++){
			s = scan.next();
			
			if(poll.containsKey(s)){
				poll.put(s, poll.get(s)+1);
			}
			else{
				poll.put(s, 1);
			}
		}
		
        for (String key : poll.keySet()) {
        	if(max < poll.get(key)){
        		max = poll.get(key);
        	}
		}
        
        Object[] mapkey = poll.keySet().toArray();
        Arrays.sort(mapkey);
        
        for (String key : poll.keySet()) {
        	if(poll.get(key)== max){
    			System.out.println(key);        		
        	}
		}
		
	}
} Main public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s;
		Map<String, Integer> poll = new TreeMap<String, Integer>();
		int max = 0;
		
		for(int i = 0; i < n; i++){
			s = scan.next();
			
			if(poll.containsKey(s)){
				poll.put(s, poll.get(s)+1);
			}
			else{
				poll.put(s, 1);
			}
		}
		
        for (String key : poll.keySet()) {
        	if(max < poll.get(key)){
        		max = poll.get(key);
        	}
		}
        
        Object[] mapkey = poll.keySet().toArray();
        Arrays.sort(mapkey);
        
        for (String key : poll.keySet()) {
        	if(poll.get(key)== max){
    			System.out.println(key);        		
        	}
		}
		
	} main {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s;
		Map<String, Integer> poll = new TreeMap<String, Integer>();
		int max = 0;
		
		for(int i = 0; i < n; i++){
			s = scan.next();
			
			if(poll.containsKey(s)){
				poll.put(s, poll.get(s)+1);
			}
			else{
				poll.put(s, 1);
			}
		}
		
        for (String key : poll.keySet()) {
        	if(max < poll.get(key)){
        		max = poll.get(key);
        	}
		}
        
        Object[] mapkey = poll.keySet().toArray();
        Arrays.sort(mapkey);
        
        for (String key : poll.keySet()) {
        	if(poll.get(key)== max){
    			System.out.println(key);        		
        	}
		}
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan String s; s Map<String, Integer> poll = new TreeMap<String, Integer>(); poll new TreeMap<String, Integer>() int max = 0; max 0 for(int i = 0; i < n; i++){
			s = scan.next();
			
			if(poll.containsKey(s)){
				poll.put(s, poll.get(s)+1);
			}
			else{
				poll.put(s, 1);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			s = scan.next();
			
			if(poll.containsKey(s)){
				poll.put(s, poll.get(s)+1);
			}
			else{
				poll.put(s, 1);
			}
		} {
			s = scan.next();
			
			if(poll.containsKey(s)){
				poll.put(s, poll.get(s)+1);
			}
			else{
				poll.put(s, 1);
			}
		} s = scan.next() s scan.next() scan.next scan if(poll.containsKey(s)){
				poll.put(s, poll.get(s)+1);
			}
			else{
				poll.put(s, 1);
			} poll.containsKey(s) poll.containsKey poll s {
				poll.put(s, poll.get(s)+1);
			} poll.put(s, poll.get(s)+1) poll.put poll s poll.get(s)+1 poll.get(s) poll.get poll s 1 {
				poll.put(s, 1);
			} poll.put(s, 1) poll.put poll s 1 for (String key : poll.keySet()) {
        	if(max < poll.get(key)){
        		max = poll.get(key);
        	}
		} String key poll.keySet() poll.keySet poll {
        	if(max < poll.get(key)){
        		max = poll.get(key);
        	}
		} {
        	if(max < poll.get(key)){
        		max = poll.get(key);
        	}
		} if(max < poll.get(key)){
        		max = poll.get(key);
        	} max < poll.get(key) max poll.get(key) poll.get poll key {
        		max = poll.get(key);
        	} max = poll.get(key) max poll.get(key) poll.get poll key Object[] mapkey = poll.keySet().toArray(); mapkey poll.keySet().toArray() poll.keySet().toArray poll.keySet() poll.keySet poll Arrays.sort(mapkey) Arrays.sort Arrays mapkey for (String key : poll.keySet()) {
        	if(poll.get(key)== max){
    			System.out.println(key);        		
        	}
		} String key poll.keySet() poll.keySet poll {
        	if(poll.get(key)== max){
    			System.out.println(key);        		
        	}
		} {
        	if(poll.get(key)== max){
    			System.out.println(key);        		
        	}
		} if(poll.get(key)== max){
    			System.out.println(key);        		
        	} poll.get(key)== max poll.get(key) poll.get poll key max {
    			System.out.println(key);        		
        	} System.out.println(key) System.out.println System.out System System.out key String args[] args public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s;
		Map<String, Integer> poll = new TreeMap<String, Integer>();
		int max = 0;
		
		for(int i = 0; i < n; i++){
			s = scan.next();
			
			if(poll.containsKey(s)){
				poll.put(s, poll.get(s)+1);
			}
			else{
				poll.put(s, 1);
			}
		}
		
        for (String key : poll.keySet()) {
        	if(max < poll.get(key)){
        		max = poll.get(key);
        	}
		}
        
        Object[] mapkey = poll.keySet().toArray();
        Arrays.sort(mapkey);
        
        for (String key : poll.keySet()) {
        	if(poll.get(key)== max){
    			System.out.println(key);        		
        	}
		}
		
	}
} public class Main {

	public static void main(String args[]){

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