import java.util.*;
//import java.math.BigInteger;
 
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //ArrayList <String> arrlist = new ArrayList <String>();
        TreeMap <String,Integer> treemap = new TreeMap <String,Integer>();
        int max = 0;
        
        for(int i=0; i<N; i++){
            String S = sc.next();
            if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            }
            //System.out.println(treemap);
        }
        //for(Map.Entry<String, String> entry : treemap.entrySet()){
        for(String S: treemap.keySet()){
            if(max < treemap.get(S)){
                max = treemap.get(S);
            }
        }
        for(String S: treemap.keySet()){
            if(max == treemap.get(S)){
                System.out.println(S);
            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //ArrayList <String> arrlist = new ArrayList <String>();
        TreeMap <String,Integer> treemap = new TreeMap <String,Integer>();
        int max = 0;
        
        for(int i=0; i<N; i++){
            String S = sc.next();
            if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            }
            //System.out.println(treemap);
        }
        //for(Map.Entry<String, String> entry : treemap.entrySet()){
        for(String S: treemap.keySet()){
            if(max < treemap.get(S)){
                max = treemap.get(S);
            }
        }
        for(String S: treemap.keySet()){
            if(max == treemap.get(S)){
                System.out.println(S);
            }
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //ArrayList <String> arrlist = new ArrayList <String>();
        TreeMap <String,Integer> treemap = new TreeMap <String,Integer>();
        int max = 0;
        
        for(int i=0; i<N; i++){
            String S = sc.next();
            if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            }
            //System.out.println(treemap);
        }
        //for(Map.Entry<String, String> entry : treemap.entrySet()){
        for(String S: treemap.keySet()){
            if(max < treemap.get(S)){
                max = treemap.get(S);
            }
        }
        for(String S: treemap.keySet()){
            if(max == treemap.get(S)){
                System.out.println(S);
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //ArrayList <String> arrlist = new ArrayList <String>();
        TreeMap <String,Integer> treemap = new TreeMap <String,Integer>();
        int max = 0;
        
        for(int i=0; i<N; i++){
            String S = sc.next();
            if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            }
            //System.out.println(treemap);
        }
        //for(Map.Entry<String, String> entry : treemap.entrySet()){
        for(String S: treemap.keySet()){
            if(max < treemap.get(S)){
                max = treemap.get(S);
            }
        }
        for(String S: treemap.keySet()){
            if(max == treemap.get(S)){
                System.out.println(S);
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc TreeMap <String,Integer> treemap = new TreeMap <String,Integer>(); treemap new TreeMap <String,Integer>() int max = 0; max 0 for(int i=0; i<N; i++){
            String S = sc.next();
            if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            }
            //System.out.println(treemap);
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            String S = sc.next();
            if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            }
            //System.out.println(treemap);
        } {
            String S = sc.next();
            if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            }
            //System.out.println(treemap);
        } String S = sc.next(); S sc.next() sc.next sc if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            } treemap.containsKey(S) treemap.containsKey treemap S {
                treemap.put(S, treemap.get(S)+1);
            } treemap.put(S, treemap.get(S)+1) treemap.put treemap S treemap.get(S)+1 treemap.get(S) treemap.get treemap S 1 {
                treemap.put(S, 1);
            } treemap.put(S, 1) treemap.put treemap S 1 for(String S: treemap.keySet()){
            if(max < treemap.get(S)){
                max = treemap.get(S);
            }
        } String S treemap.keySet() treemap.keySet treemap {
            if(max < treemap.get(S)){
                max = treemap.get(S);
            }
        } {
            if(max < treemap.get(S)){
                max = treemap.get(S);
            }
        } if(max < treemap.get(S)){
                max = treemap.get(S);
            } max < treemap.get(S) max treemap.get(S) treemap.get treemap S {
                max = treemap.get(S);
            } max = treemap.get(S) max treemap.get(S) treemap.get treemap S for(String S: treemap.keySet()){
            if(max == treemap.get(S)){
                System.out.println(S);
            }
        } String S treemap.keySet() treemap.keySet treemap {
            if(max == treemap.get(S)){
                System.out.println(S);
            }
        } {
            if(max == treemap.get(S)){
                System.out.println(S);
            }
        } if(max == treemap.get(S)){
                System.out.println(S);
            } max == treemap.get(S) max treemap.get(S) treemap.get treemap S {
                System.out.println(S);
            } System.out.println(S) System.out.println System.out System System.out S String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //ArrayList <String> arrlist = new ArrayList <String>();
        TreeMap <String,Integer> treemap = new TreeMap <String,Integer>();
        int max = 0;
        
        for(int i=0; i<N; i++){
            String S = sc.next();
            if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            }
            //System.out.println(treemap);
        }
        //for(Map.Entry<String, String> entry : treemap.entrySet()){
        for(String S: treemap.keySet()){
            if(max < treemap.get(S)){
                max = treemap.get(S);
            }
        }
        for(String S: treemap.keySet()){
            if(max == treemap.get(S)){
                System.out.println(S);
            }
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //ArrayList <String> arrlist = new ArrayList <String>();
        TreeMap <String,Integer> treemap = new TreeMap <String,Integer>();
        int max = 0;
        
        for(int i=0; i<N; i++){
            String S = sc.next();
            if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            }
            //System.out.println(treemap);
        }
        //for(Map.Entry<String, String> entry : treemap.entrySet()){
        for(String S: treemap.keySet()){
            if(max < treemap.get(S)){
                max = treemap.get(S);
            }
        }
        for(String S: treemap.keySet()){
            if(max == treemap.get(S)){
                System.out.println(S);
            }
        }
    }
} Main
import java.util.*;
//import java.math.BigInteger;
 
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //ArrayList <String> arrlist = new ArrayList <String>();
        TreeMap <String,Integer> treemap = new TreeMap <String,Integer>();
        int max = 0;
        
        for(int i=0; i<N; i++){
            String S = sc.next();
            if(treemap.containsKey(S)){
                treemap.put(S, treemap.get(S)+1);
            }else{
                treemap.put(S, 1);
            }
            //System.out.println(treemap);
        }
        //for(Map.Entry<String, String> entry : treemap.entrySet()){
        for(String S: treemap.keySet()){
            if(max < treemap.get(S)){
                max = treemap.get(S);
            }
        }
        for(String S: treemap.keySet()){
            if(max == treemap.get(S)){
                System.out.println(S);
            }
        }
    }
}