import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
      
        int n = Integer.parseInt(sc.next());
        TreeMap<String, Integer> map = new TreeMap<>();
        String str;
        Integer count;
        for (int i = 0; i < n; i++) {
            str = sc.next();
            if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            }
            map.put(str, count);
        }
        Set<Map.Entry<String, Integer>> set = map.entrySet();
        int max = 0;
        for (Map.Entry<String, Integer> e : set) {
            max = Math.max(e.getValue(), max);
        }
        for (Map.Entry<String, Integer> e : set) {
            if (e.getValue() == max) out.println(e.getKey());
        }

        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
      
        int n = Integer.parseInt(sc.next());
        TreeMap<String, Integer> map = new TreeMap<>();
        String str;
        Integer count;
        for (int i = 0; i < n; i++) {
            str = sc.next();
            if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            }
            map.put(str, count);
        }
        Set<Map.Entry<String, Integer>> set = map.entrySet();
        int max = 0;
        for (Map.Entry<String, Integer> e : set) {
            max = Math.max(e.getValue(), max);
        }
        for (Map.Entry<String, Integer> e : set) {
            if (e.getValue() == max) out.println(e.getKey());
        }

        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
      
        int n = Integer.parseInt(sc.next());
        TreeMap<String, Integer> map = new TreeMap<>();
        String str;
        Integer count;
        for (int i = 0; i < n; i++) {
            str = sc.next();
            if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            }
            map.put(str, count);
        }
        Set<Map.Entry<String, Integer>> set = map.entrySet();
        int max = 0;
        for (Map.Entry<String, Integer> e : set) {
            max = Math.max(e.getValue(), max);
        }
        for (Map.Entry<String, Integer> e : set) {
            if (e.getValue() == max) out.println(e.getKey());
        }

        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
      
        int n = Integer.parseInt(sc.next());
        TreeMap<String, Integer> map = new TreeMap<>();
        String str;
        Integer count;
        for (int i = 0; i < n; i++) {
            str = sc.next();
            if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            }
            map.put(str, count);
        }
        Set<Map.Entry<String, Integer>> set = map.entrySet();
        int max = 0;
        for (Map.Entry<String, Integer> e : set) {
            max = Math.max(e.getValue(), max);
        }
        for (Map.Entry<String, Integer> e : set) {
            if (e.getValue() == max) out.println(e.getKey());
        }

        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc TreeMap<String, Integer> map = new TreeMap<>(); map new TreeMap<>() String str; str Integer count; count for (int i = 0; i < n; i++) {
            str = sc.next();
            if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            }
            map.put(str, count);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            str = sc.next();
            if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            }
            map.put(str, count);
        } {
            str = sc.next();
            if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            }
            map.put(str, count);
        } str = sc.next() str sc.next() sc.next sc if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            } map.containsKey(str) map.containsKey map str {
                count = map.get(str) + 1;
            } count = map.get(str) + 1 count map.get(str) + 1 map.get(str) map.get map str 1 {
                count = 1;
            } count = 1 count 1 map.put(str, count) map.put map str count Set<Map.Entry<String, Integer>> set = map.entrySet(); set map.entrySet() map.entrySet map int max = 0; max 0 for (Map.Entry<String, Integer> e : set) {
            max = Math.max(e.getValue(), max);
        } Map.Entry<String, Integer> e set {
            max = Math.max(e.getValue(), max);
        } {
            max = Math.max(e.getValue(), max);
        } max = Math.max(e.getValue(), max) max Math.max(e.getValue(), max) Math.max Math e.getValue() e.getValue e max for (Map.Entry<String, Integer> e : set) {
            if (e.getValue() == max) out.println(e.getKey());
        } Map.Entry<String, Integer> e set {
            if (e.getValue() == max) out.println(e.getKey());
        } {
            if (e.getValue() == max) out.println(e.getKey());
        } if (e.getValue() == max) out.println(e.getKey()); e.getValue() == max e.getValue() e.getValue e max out.println(e.getKey()) out.println out e.getKey() e.getKey e out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
      
        int n = Integer.parseInt(sc.next());
        TreeMap<String, Integer> map = new TreeMap<>();
        String str;
        Integer count;
        for (int i = 0; i < n; i++) {
            str = sc.next();
            if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            }
            map.put(str, count);
        }
        Set<Map.Entry<String, Integer>> set = map.entrySet();
        int max = 0;
        for (Map.Entry<String, Integer> e : set) {
            max = Math.max(e.getValue(), max);
        }
        for (Map.Entry<String, Integer> e : set) {
            if (e.getValue() == max) out.println(e.getKey());
        }

        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
      
        int n = Integer.parseInt(sc.next());
        TreeMap<String, Integer> map = new TreeMap<>();
        String str;
        Integer count;
        for (int i = 0; i < n; i++) {
            str = sc.next();
            if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            }
            map.put(str, count);
        }
        Set<Map.Entry<String, Integer>> set = map.entrySet();
        int max = 0;
        for (Map.Entry<String, Integer> e : set) {
            max = Math.max(e.getValue(), max);
        }
        for (Map.Entry<String, Integer> e : set) {
            if (e.getValue() == max) out.println(e.getKey());
        }

        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
      
        int n = Integer.parseInt(sc.next());
        TreeMap<String, Integer> map = new TreeMap<>();
        String str;
        Integer count;
        for (int i = 0; i < n; i++) {
            str = sc.next();
            if (map.containsKey(str)) {
                count = map.get(str) + 1;
            } else {
                count = 1;
            }
            map.put(str, count);
        }
        Set<Map.Entry<String, Integer>> set = map.entrySet();
        int max = 0;
        for (Map.Entry<String, Integer> e : set) {
            max = Math.max(e.getValue(), max);
        }
        for (Map.Entry<String, Integer> e : set) {
            if (e.getValue() == max) out.println(e.getKey());
        }

        out.flush();
    }
}