import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Map;
import java.util.TreeMap;

public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        int n = Integer.parseInt(br.readLine());
        String s;
        Map<String, Integer> map = new TreeMap<>();
        int max = 0;
        for (int i = 0; i < n; i++) {
            s = br.readLine();
            int val = map.containsKey(s) ? map.get(s) + 1 : 1;
            map.put(s, val);
            max = Math.max(max, val);
        }

        br.close();

        for (String key : map.keySet()) {
            if (map.get(key) == max) {
                bw.write(key + "\n");
            }
        }

        bw.flush();

    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.BufferedWriter; BufferedWriter java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io import java.util.Map; Map java.util import java.util.TreeMap; TreeMap java.util public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        int n = Integer.parseInt(br.readLine());
        String s;
        Map<String, Integer> map = new TreeMap<>();
        int max = 0;
        for (int i = 0; i < n; i++) {
            s = br.readLine();
            int val = map.containsKey(s) ? map.get(s) + 1 : 1;
            map.put(s, val);
            max = Math.max(max, val);
        }

        br.close();

        for (String key : map.keySet()) {
            if (map.get(key) == max) {
                bw.write(key + "\n");
            }
        }

        bw.flush();

    }
} Main public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        int n = Integer.parseInt(br.readLine());
        String s;
        Map<String, Integer> map = new TreeMap<>();
        int max = 0;
        for (int i = 0; i < n; i++) {
            s = br.readLine();
            int val = map.containsKey(s) ? map.get(s) + 1 : 1;
            map.put(s, val);
            max = Math.max(max, val);
        }

        br.close();

        for (String key : map.keySet()) {
            if (map.get(key) == max) {
                bw.write(key + "\n");
            }
        }

        bw.flush();

    } main {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        int n = Integer.parseInt(br.readLine());
        String s;
        Map<String, Integer> map = new TreeMap<>();
        int max = 0;
        for (int i = 0; i < n; i++) {
            s = br.readLine();
            int val = map.containsKey(s) ? map.get(s) + 1 : 1;
            map.put(s, val);
            max = Math.max(max, val);
        }

        br.close();

        for (String key : map.keySet()) {
            if (map.get(key) == max) {
                bw.write(key + "\n");
            }
        }

        bw.flush();

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); bw new BufferedWriter(new OutputStreamWriter(System.out)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String s; s Map<String, Integer> map = new TreeMap<>(); map new TreeMap<>() int max = 0; max 0 for (int i = 0; i < n; i++) {
            s = br.readLine();
            int val = map.containsKey(s) ? map.get(s) + 1 : 1;
            map.put(s, val);
            max = Math.max(max, val);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            s = br.readLine();
            int val = map.containsKey(s) ? map.get(s) + 1 : 1;
            map.put(s, val);
            max = Math.max(max, val);
        } {
            s = br.readLine();
            int val = map.containsKey(s) ? map.get(s) + 1 : 1;
            map.put(s, val);
            max = Math.max(max, val);
        } s = br.readLine() s br.readLine() br.readLine br int val = map.containsKey(s) ? map.get(s) + 1 : 1; val map.containsKey(s) ? map.get(s) + 1 : 1 map.containsKey(s) map.containsKey map s map.get(s) + 1 map.get(s) map.get map s 1 1 map.put(s, val) map.put map s val max = Math.max(max, val) max Math.max(max, val) Math.max Math max val br.close() br.close br for (String key : map.keySet()) {
            if (map.get(key) == max) {
                bw.write(key + "\n");
            }
        } String key map.keySet() map.keySet map {
            if (map.get(key) == max) {
                bw.write(key + "\n");
            }
        } {
            if (map.get(key) == max) {
                bw.write(key + "\n");
            }
        } if (map.get(key) == max) {
                bw.write(key + "\n");
            } map.get(key) == max map.get(key) map.get map key max {
                bw.write(key + "\n");
            } bw.write(key + "\n") bw.write bw key + "\n" key "\n" bw.flush() bw.flush bw String[] args args public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        int n = Integer.parseInt(br.readLine());
        String s;
        Map<String, Integer> map = new TreeMap<>();
        int max = 0;
        for (int i = 0; i < n; i++) {
            s = br.readLine();
            int val = map.containsKey(s) ? map.get(s) + 1 : 1;
            map.put(s, val);
            max = Math.max(max, val);
        }

        br.close();

        for (String key : map.keySet()) {
            if (map.get(key) == max) {
                bw.write(key + "\n");
            }
        }

        bw.flush();

    }
} public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        int n = Integer.parseInt(br.readLine());
        String s;
        Map<String, Integer> map = new TreeMap<>();
        int max = 0;
        for (int i = 0; i < n; i++) {
            s = br.readLine();
            int val = map.containsKey(s) ? map.get(s) + 1 : 1;
            map.put(s, val);
            max = Math.max(max, val);
        }

        br.close();

        for (String key : map.keySet()) {
            if (map.get(key) == max) {
                bw.write(key + "\n");
            }
        }

        bw.flush();

    }
} Main
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Map;
import java.util.TreeMap;

public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        int n = Integer.parseInt(br.readLine());
        String s;
        Map<String, Integer> map = new TreeMap<>();
        int max = 0;
        for (int i = 0; i < n; i++) {
            s = br.readLine();
            int val = map.containsKey(s) ? map.get(s) + 1 : 1;
            map.put(s, val);
            max = Math.max(max, val);
        }

        br.close();

        for (String key : map.keySet()) {
            if (map.get(key) == max) {
                bw.write(key + "\n");
            }
        }

        bw.flush();

    }
}