
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {

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

        int N = sc.nextInt();

        Map<String, Integer> m = new TreeMap<String, Integer>();

        int max = 0;
        for (int i = 0; i < N; i++) {
            String S = sc.next();
            if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            }
            if (max < m.get(S)) {
                max = m.get(S);
            }
        }

        for (Entry<String, Integer> s : m.entrySet()) {
            if (s.getValue() == max) {
                System.out.println(s.getKey());
            }
        }

    }

} import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {

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

        int N = sc.nextInt();

        Map<String, Integer> m = new TreeMap<String, Integer>();

        int max = 0;
        for (int i = 0; i < N; i++) {
            String S = sc.next();
            if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            }
            if (max < m.get(S)) {
                max = m.get(S);
            }
        }

        for (Entry<String, Integer> s : m.entrySet()) {
            if (s.getValue() == max) {
                System.out.println(s.getKey());
            }
        }

    }

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

        int N = sc.nextInt();

        Map<String, Integer> m = new TreeMap<String, Integer>();

        int max = 0;
        for (int i = 0; i < N; i++) {
            String S = sc.next();
            if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            }
            if (max < m.get(S)) {
                max = m.get(S);
            }
        }

        for (Entry<String, Integer> s : m.entrySet()) {
            if (s.getValue() == max) {
                System.out.println(s.getKey());
            }
        }

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

        int N = sc.nextInt();

        Map<String, Integer> m = new TreeMap<String, Integer>();

        int max = 0;
        for (int i = 0; i < N; i++) {
            String S = sc.next();
            if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            }
            if (max < m.get(S)) {
                max = m.get(S);
            }
        }

        for (Entry<String, Integer> s : m.entrySet()) {
            if (s.getValue() == max) {
                System.out.println(s.getKey());
            }
        }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Map<String, Integer> m = new TreeMap<String, Integer>(); m new TreeMap<String, Integer>() int max = 0; max 0 for (int i = 0; i < N; i++) {
            String S = sc.next();
            if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            }
            if (max < m.get(S)) {
                max = m.get(S);
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            String S = sc.next();
            if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            }
            if (max < m.get(S)) {
                max = m.get(S);
            }
        } {
            String S = sc.next();
            if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            }
            if (max < m.get(S)) {
                max = m.get(S);
            }
        } String S = sc.next(); S sc.next() sc.next sc if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            } m.containsKey(S) m.containsKey m S {
                m.put(S, m.get(S) + 1);
            } m.put(S, m.get(S) + 1) m.put m S m.get(S) + 1 m.get(S) m.get m S 1 {
                m.put(S, 1);
            } m.put(S, 1) m.put m S 1 if (max < m.get(S)) {
                max = m.get(S);
            } max < m.get(S) max m.get(S) m.get m S {
                max = m.get(S);
            } max = m.get(S) max m.get(S) m.get m S for (Entry<String, Integer> s : m.entrySet()) {
            if (s.getValue() == max) {
                System.out.println(s.getKey());
            }
        } Entry<String, Integer> s m.entrySet() m.entrySet m {
            if (s.getValue() == max) {
                System.out.println(s.getKey());
            }
        } {
            if (s.getValue() == max) {
                System.out.println(s.getKey());
            }
        } if (s.getValue() == max) {
                System.out.println(s.getKey());
            } s.getValue() == max s.getValue() s.getValue s max {
                System.out.println(s.getKey());
            } System.out.println(s.getKey()) System.out.println System.out System System.out s.getKey() s.getKey s String[] args args public class Main {

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

        int N = sc.nextInt();

        Map<String, Integer> m = new TreeMap<String, Integer>();

        int max = 0;
        for (int i = 0; i < N; i++) {
            String S = sc.next();
            if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            }
            if (max < m.get(S)) {
                max = m.get(S);
            }
        }

        for (Entry<String, Integer> s : m.entrySet()) {
            if (s.getValue() == max) {
                System.out.println(s.getKey());
            }
        }

    }

} public class Main {

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

        int N = sc.nextInt();

        Map<String, Integer> m = new TreeMap<String, Integer>();

        int max = 0;
        for (int i = 0; i < N; i++) {
            String S = sc.next();
            if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            }
            if (max < m.get(S)) {
                max = m.get(S);
            }
        }

        for (Entry<String, Integer> s : m.entrySet()) {
            if (s.getValue() == max) {
                System.out.println(s.getKey());
            }
        }

    }

} Main

import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {

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

        int N = sc.nextInt();

        Map<String, Integer> m = new TreeMap<String, Integer>();

        int max = 0;
        for (int i = 0; i < N; i++) {
            String S = sc.next();
            if (m.containsKey(S)) {
                m.put(S, m.get(S) + 1);
            } else {
                m.put(S, 1);
            }
            if (max < m.get(S)) {
                max = m.get(S);
            }
        }

        for (Entry<String, Integer> s : m.entrySet()) {
            if (s.getValue() == max) {
                System.out.println(s.getKey());
            }
        }

    }

}
