import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        String curr;
        TreeMap<String,Integer> hm=new TreeMap<>();
        int currMax = 0;
        for (int i = 0; i < n; i++){
            curr = sc.nextLine();
            if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            }
            if(hm.get(curr)>=currMax)
                currMax = hm.get(curr);
        }
        for(Map.Entry e:hm.	entrySet()){
            if((int)e.getValue()==currMax)
                System.out.println(e.getKey());

        }




    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        String curr;
        TreeMap<String,Integer> hm=new TreeMap<>();
        int currMax = 0;
        for (int i = 0; i < n; i++){
            curr = sc.nextLine();
            if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            }
            if(hm.get(curr)>=currMax)
                currMax = hm.get(curr);
        }
        for(Map.Entry e:hm.	entrySet()){
            if((int)e.getValue()==currMax)
                System.out.println(e.getKey());

        }




    }
} Main public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        String curr;
        TreeMap<String,Integer> hm=new TreeMap<>();
        int currMax = 0;
        for (int i = 0; i < n; i++){
            curr = sc.nextLine();
            if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            }
            if(hm.get(curr)>=currMax)
                currMax = hm.get(curr);
        }
        for(Map.Entry e:hm.	entrySet()){
            if((int)e.getValue()==currMax)
                System.out.println(e.getKey());

        }




    } main {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        String curr;
        TreeMap<String,Integer> hm=new TreeMap<>();
        int currMax = 0;
        for (int i = 0; i < n; i++){
            curr = sc.nextLine();
            if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            }
            if(hm.get(curr)>=currMax)
                currMax = hm.get(curr);
        }
        for(Map.Entry e:hm.	entrySet()){
            if((int)e.getValue()==currMax)
                System.out.println(e.getKey());

        }




    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc String curr; curr TreeMap<String,Integer> hm=new TreeMap<>(); hm new TreeMap<>() int currMax = 0; currMax 0 for (int i = 0; i < n; i++){
            curr = sc.nextLine();
            if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            }
            if(hm.get(curr)>=currMax)
                currMax = hm.get(curr);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            curr = sc.nextLine();
            if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            }
            if(hm.get(curr)>=currMax)
                currMax = hm.get(curr);
        } {
            curr = sc.nextLine();
            if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            }
            if(hm.get(curr)>=currMax)
                currMax = hm.get(curr);
        } curr = sc.nextLine() curr sc.nextLine() sc.nextLine sc if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            } !hm.containsKey(curr) hm.containsKey(curr) hm.containsKey hm curr {
                hm.put(curr,1);
            } hm.put(curr,1) hm.put hm curr 1 {
                hm.put(curr, hm.get(curr)+1);
            } hm.put(curr, hm.get(curr)+1) hm.put hm curr hm.get(curr)+1 hm.get(curr) hm.get hm curr 1 if(hm.get(curr)>=currMax)
                currMax = hm.get(curr); hm.get(curr)>=currMax hm.get(curr) hm.get hm curr currMax currMax = hm.get(curr) currMax hm.get(curr) hm.get hm curr for(Map.Entry e:hm.	entrySet()){
            if((int)e.getValue()==currMax)
                System.out.println(e.getKey());

        } Map.Entry e hm.	entrySet() hm.	entrySet hm {
            if((int)e.getValue()==currMax)
                System.out.println(e.getKey());

        } {
            if((int)e.getValue()==currMax)
                System.out.println(e.getKey());

        } if((int)e.getValue()==currMax)
                System.out.println(e.getKey()); (int)e.getValue()==currMax (int)e.getValue() e.getValue e currMax System.out.println(e.getKey()) System.out.println System.out System System.out e.getKey() e.getKey e String[] args args public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        String curr;
        TreeMap<String,Integer> hm=new TreeMap<>();
        int currMax = 0;
        for (int i = 0; i < n; i++){
            curr = sc.nextLine();
            if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            }
            if(hm.get(curr)>=currMax)
                currMax = hm.get(curr);
        }
        for(Map.Entry e:hm.	entrySet()){
            if((int)e.getValue()==currMax)
                System.out.println(e.getKey());

        }




    }
} public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        String curr;
        TreeMap<String,Integer> hm=new TreeMap<>();
        int currMax = 0;
        for (int i = 0; i < n; i++){
            curr = sc.nextLine();
            if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            }
            if(hm.get(curr)>=currMax)
                currMax = hm.get(curr);
        }
        for(Map.Entry e:hm.	entrySet()){
            if((int)e.getValue()==currMax)
                System.out.println(e.getKey());

        }




    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        String curr;
        TreeMap<String,Integer> hm=new TreeMap<>();
        int currMax = 0;
        for (int i = 0; i < n; i++){
            curr = sc.nextLine();
            if(!hm.containsKey(curr)){
                hm.put(curr,1);
            } else{
                hm.put(curr, hm.get(curr)+1);
            }
            if(hm.get(curr)>=currMax)
                currMax = hm.get(curr);
        }
        for(Map.Entry e:hm.	entrySet()){
            if((int)e.getValue()==currMax)
                System.out.println(e.getKey());

        }




    }
}
