import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        TreeMap<String, Integer> map = new TreeMap<String, Integer>();
        int max = 0;
        for(int i=0;i<n;i++){
            String s = sc.next();
           if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           }
        }

        for(Map.Entry<String, Integer> entry :map.entrySet()){
            if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        TreeMap<String, Integer> map = new TreeMap<String, Integer>();
        int max = 0;
        for(int i=0;i<n;i++){
            String s = sc.next();
           if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           }
        }

        for(Map.Entry<String, Integer> entry :map.entrySet()){
            if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        TreeMap<String, Integer> map = new TreeMap<String, Integer>();
        int max = 0;
        for(int i=0;i<n;i++){
            String s = sc.next();
           if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           }
        }

        for(Map.Entry<String, Integer> entry :map.entrySet()){
            if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            }
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        TreeMap<String, Integer> map = new TreeMap<String, Integer>();
        int max = 0;
        for(int i=0;i<n;i++){
            String s = sc.next();
           if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           }
        }

        for(Map.Entry<String, Integer> entry :map.entrySet()){
            if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc TreeMap<String, Integer> map = new TreeMap<String, Integer>(); map new TreeMap<String, Integer>() int max = 0; max 0 for(int i=0;i<n;i++){
            String s = sc.next();
           if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            String s = sc.next();
           if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           }
        } {
            String s = sc.next();
           if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           }
        } String s = sc.next(); s sc.next() sc.next sc if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           } map.containsKey(s) map.containsKey map s {
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } int t = map.get(s) + 1; t map.get(s) + 1 map.get(s) map.get map s 1 map.put(s, t) map.put map s t max = Math.max(t, max) max Math.max(t, max) Math.max Math t max {
               map.put(s, 1);
               max = Math.max(max,1);
           } map.put(s, 1) map.put map s 1 max = Math.max(max,1) max Math.max(max,1) Math.max Math max 1 for(Map.Entry<String, Integer> entry :map.entrySet()){
            if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            }
        } Map.Entry<String, Integer> entry map.entrySet() map.entrySet map {
            if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            }
        } {
            if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            }
        } if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            } entry.getValue().equals(max) entry.getValue().equals entry.getValue() entry.getValue entry max {
                System.out.println(entry.getKey());

            } System.out.println(entry.getKey()) System.out.println System.out System System.out entry.getKey() entry.getKey entry String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        TreeMap<String, Integer> map = new TreeMap<String, Integer>();
        int max = 0;
        for(int i=0;i<n;i++){
            String s = sc.next();
           if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           }
        }

        for(Map.Entry<String, Integer> entry :map.entrySet()){
            if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        TreeMap<String, Integer> map = new TreeMap<String, Integer>();
        int max = 0;
        for(int i=0;i<n;i++){
            String s = sc.next();
           if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           }
        }

        for(Map.Entry<String, Integer> entry :map.entrySet()){
            if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        TreeMap<String, Integer> map = new TreeMap<String, Integer>();
        int max = 0;
        for(int i=0;i<n;i++){
            String s = sc.next();
           if(map.containsKey(s)){
               int t = map.get(s) + 1;
               map.put(s, t);
               max = Math.max(t, max);
           } else {
               map.put(s, 1);
               max = Math.max(max,1);
           }
        }

        for(Map.Entry<String, Integer> entry :map.entrySet()){
            if(entry.getValue().equals(max)){
                System.out.println(entry.getKey());

            }
        }
    }
}
