import java.util.*;


class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        Map<String, Integer> dic = new TreeMap<>();
        int N = sc.nextInt();
        sc.nextLine();
        int max = 0;

        for (int i = 0; i < N; i++) {
            String tmp = sc.nextLine();
            if (dic.get(tmp) == null){
                dic.put(tmp, 1);
            } else {
                int x = dic.get(tmp)+1;
                dic.put(tmp, x);
            }
        }

        for (int i : dic.values()){
            if (max < i){
                max = i;
            }
        }

        for (String s : dic.keySet()){
            if(dic.get(s) == max) {
                System.out.println(s);
            }
        }
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        Map<String, Integer> dic = new TreeMap<>();
        int N = sc.nextInt();
        sc.nextLine();
        int max = 0;

        for (int i = 0; i < N; i++) {
            String tmp = sc.nextLine();
            if (dic.get(tmp) == null){
                dic.put(tmp, 1);
            } else {
                int x = dic.get(tmp)+1;
                dic.put(tmp, x);
            }
        }

        for (int i : dic.values()){
            if (max < i){
                max = i;
            }
        }

        for (String s : dic.keySet()){
            if(dic.get(s) == max) {
                System.out.println(s);
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        Map<String, Integer> dic = new TreeMap<>();
        int N = sc.nextInt();
        sc.nextLine();
        int max = 0;

        for (int i = 0; i < N; i++) {
            String tmp = sc.nextLine();
            if (dic.get(tmp) == null){
                dic.put(tmp, 1);
            } else {
                int x = dic.get(tmp)+1;
                dic.put(tmp, x);
            }
        }

        for (int i : dic.values()){
            if (max < i){
                max = i;
            }
        }

        for (String s : dic.keySet()){
            if(dic.get(s) == max) {
                System.out.println(s);
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        
        Map<String, Integer> dic = new TreeMap<>();
        int N = sc.nextInt();
        sc.nextLine();
        int max = 0;

        for (int i = 0; i < N; i++) {
            String tmp = sc.nextLine();
            if (dic.get(tmp) == null){
                dic.put(tmp, 1);
            } else {
                int x = dic.get(tmp)+1;
                dic.put(tmp, x);
            }
        }

        for (int i : dic.values()){
            if (max < i){
                max = i;
            }
        }

        for (String s : dic.keySet()){
            if(dic.get(s) == max) {
                System.out.println(s);
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Map<String, Integer> dic = new TreeMap<>(); dic new TreeMap<>() int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc int max = 0; max 0 for (int i = 0; i < N; i++) {
            String tmp = sc.nextLine();
            if (dic.get(tmp) == null){
                dic.put(tmp, 1);
            } else {
                int x = dic.get(tmp)+1;
                dic.put(tmp, x);
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            String tmp = sc.nextLine();
            if (dic.get(tmp) == null){
                dic.put(tmp, 1);
            } else {
                int x = dic.get(tmp)+1;
                dic.put(tmp, x);
            }
        } {
            String tmp = sc.nextLine();
            if (dic.get(tmp) == null){
                dic.put(tmp, 1);
            } else {
                int x = dic.get(tmp)+1;
                dic.put(tmp, x);
            }
        } String tmp = sc.nextLine(); tmp sc.nextLine() sc.nextLine sc if (dic.get(tmp) == null){
                dic.put(tmp, 1);
            } else {
                int x = dic.get(tmp)+1;
                dic.put(tmp, x);
            } dic.get(tmp) == null dic.get(tmp) dic.get dic tmp null {
                dic.put(tmp, 1);
            } dic.put(tmp, 1) dic.put dic tmp 1 {
                int x = dic.get(tmp)+1;
                dic.put(tmp, x);
            } int x = dic.get(tmp)+1; x dic.get(tmp)+1 dic.get(tmp) dic.get dic tmp 1 dic.put(tmp, x) dic.put dic tmp x for (int i : dic.values()){
            if (max < i){
                max = i;
            }
        } int i dic.values() dic.values dic {
            if (max < i){
                max = i;
            }
        } {
            if (max < i){
                max = i;
            }
        } if (max < i){
                max = i;
            } max < i max i {
                max = i;
            } max = i max i for (String s : dic.keySet()){
            if(dic.get(s) == max) {
                System.out.println(s);
            }
        } String s dic.keySet() dic.keySet dic {
            if(dic.get(s) == max) {
                System.out.println(s);
            }
        } {
            if(dic.get(s) == max) {
                System.out.println(s);
            }
        } if(dic.get(s) == max) {
                System.out.println(s);
            } dic.get(s) == max dic.get(s) dic.get dic s max {
                System.out.println(s);
            } System.out.println(s) System.out.println System.out System System.out s String[] args args
import java.util.*;


class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        Map<String, Integer> dic = new TreeMap<>();
        int N = sc.nextInt();
        sc.nextLine();
        int max = 0;

        for (int i = 0; i < N; i++) {
            String tmp = sc.nextLine();
            if (dic.get(tmp) == null){
                dic.put(tmp, 1);
            } else {
                int x = dic.get(tmp)+1;
                dic.put(tmp, x);
            }
        }

        for (int i : dic.values()){
            if (max < i){
                max = i;
            }
        }

        for (String s : dic.keySet()){
            if(dic.get(s) == max) {
                System.out.println(s);
            }
        }
    }
}