import java.util.Scanner;
import java.util.HashMap;
import java.util.TreeMap;
import java.util.Map;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;
import java.lang.Math;

public class Main {

    private static Scanner sc = new Scanner(System.in);
    private static int mod = (int) 10e8 + 7;

    public static void main(String[] args) {
        int n = sc.nextInt();
        Map<String, Integer> strings = new TreeMap<String, Integer>();
        String s;
        for (int i = 0; i < n; i++) {
            s = sc.next();
            if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            }
        }
        int max = Integer.MIN_VALUE;
        for (int i : strings.values()) {
            if (i > max) max = i;
        }
        for (Map.Entry<String, Integer> ans : strings.entrySet()) {
            if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            }
        }
    }

} import java.util.Scanner; Scanner java.util import java.util.HashMap; HashMap java.util import java.util.TreeMap; TreeMap java.util import java.util.Map; Map java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Arrays; Arrays java.util import java.util.ArrayList; ArrayList java.util import java.lang.Math; Math java.lang public class Main {

    private static Scanner sc = new Scanner(System.in);
    private static int mod = (int) 10e8 + 7;

    public static void main(String[] args) {
        int n = sc.nextInt();
        Map<String, Integer> strings = new TreeMap<String, Integer>();
        String s;
        for (int i = 0; i < n; i++) {
            s = sc.next();
            if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            }
        }
        int max = Integer.MIN_VALUE;
        for (int i : strings.values()) {
            if (i > max) max = i;
        }
        for (Map.Entry<String, Integer> ans : strings.entrySet()) {
            if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            }
        }
    }

} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) private static int mod = (int) 10e8 + 7; mod (int) 10e8 + 7 (int) 10e8 7 public static void main(String[] args) {
        int n = sc.nextInt();
        Map<String, Integer> strings = new TreeMap<String, Integer>();
        String s;
        for (int i = 0; i < n; i++) {
            s = sc.next();
            if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            }
        }
        int max = Integer.MIN_VALUE;
        for (int i : strings.values()) {
            if (i > max) max = i;
        }
        for (Map.Entry<String, Integer> ans : strings.entrySet()) {
            if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            }
        }
    } main {
        int n = sc.nextInt();
        Map<String, Integer> strings = new TreeMap<String, Integer>();
        String s;
        for (int i = 0; i < n; i++) {
            s = sc.next();
            if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            }
        }
        int max = Integer.MIN_VALUE;
        for (int i : strings.values()) {
            if (i > max) max = i;
        }
        for (Map.Entry<String, Integer> ans : strings.entrySet()) {
            if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            }
        }
    } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Map<String, Integer> strings = new TreeMap<String, Integer>(); strings new TreeMap<String, Integer>() String s; s for (int i = 0; i < n; i++) {
            s = sc.next();
            if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            s = sc.next();
            if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            }
        } {
            s = sc.next();
            if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            }
        } s = sc.next() s sc.next() sc.next sc if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            } strings.containsKey(s) strings.containsKey strings s {
                strings.put(s, strings.get(s)+1);
            } strings.put(s, strings.get(s)+1) strings.put strings s strings.get(s)+1 strings.get(s) strings.get strings s 1 {
                strings.put(s, 1);
            } strings.put(s, 1) strings.put strings s 1 int max = Integer.MIN_VALUE; max Integer.MIN_VALUE Integer Integer.MIN_VALUE for (int i : strings.values()) {
            if (i > max) max = i;
        } int i strings.values() strings.values strings {
            if (i > max) max = i;
        } {
            if (i > max) max = i;
        } if (i > max) max = i; i > max i max max = i max i for (Map.Entry<String, Integer> ans : strings.entrySet()) {
            if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            }
        } Map.Entry<String, Integer> ans strings.entrySet() strings.entrySet strings {
            if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            }
        } {
            if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            }
        } if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            } ans.getValue() == max ans.getValue() ans.getValue ans max {
                System.out.println(ans.getKey());
            } System.out.println(ans.getKey()) System.out.println System.out System System.out ans.getKey() ans.getKey ans String[] args args public class Main {

    private static Scanner sc = new Scanner(System.in);
    private static int mod = (int) 10e8 + 7;

    public static void main(String[] args) {
        int n = sc.nextInt();
        Map<String, Integer> strings = new TreeMap<String, Integer>();
        String s;
        for (int i = 0; i < n; i++) {
            s = sc.next();
            if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            }
        }
        int max = Integer.MIN_VALUE;
        for (int i : strings.values()) {
            if (i > max) max = i;
        }
        for (Map.Entry<String, Integer> ans : strings.entrySet()) {
            if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            }
        }
    }

} public class Main {

    private static Scanner sc = new Scanner(System.in);
    private static int mod = (int) 10e8 + 7;

    public static void main(String[] args) {
        int n = sc.nextInt();
        Map<String, Integer> strings = new TreeMap<String, Integer>();
        String s;
        for (int i = 0; i < n; i++) {
            s = sc.next();
            if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            }
        }
        int max = Integer.MIN_VALUE;
        for (int i : strings.values()) {
            if (i > max) max = i;
        }
        for (Map.Entry<String, Integer> ans : strings.entrySet()) {
            if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            }
        }
    }

} Main
import java.util.Scanner;
import java.util.HashMap;
import java.util.TreeMap;
import java.util.Map;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;
import java.lang.Math;

public class Main {

    private static Scanner sc = new Scanner(System.in);
    private static int mod = (int) 10e8 + 7;

    public static void main(String[] args) {
        int n = sc.nextInt();
        Map<String, Integer> strings = new TreeMap<String, Integer>();
        String s;
        for (int i = 0; i < n; i++) {
            s = sc.next();
            if (strings.containsKey(s)) {
                strings.put(s, strings.get(s)+1);
            } else {
                strings.put(s, 1);
            }
        }
        int max = Integer.MIN_VALUE;
        for (int i : strings.values()) {
            if (i > max) max = i;
        }
        for (Map.Entry<String, Integer> ans : strings.entrySet()) {
            if (ans.getValue() == max) {
                System.out.println(ans.getKey());
            }
        }
    }

}
