import java.util.*;

public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        Map<String, Integer> map = new HashMap<>();
        int max = 0;
        for(int i = 0; i < N; i++) {
            String key = scanner.next();
            if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            }
        }

        List<String> listOfCountryNames = new ArrayList<>();
        for (String key : map.keySet()) {
            if(map.get(key) == max) {
                listOfCountryNames.add(key);
            }
        }

        java.util.Collections.sort(listOfCountryNames);

        for (String name : listOfCountryNames) {
            System.out.println(name);
        }

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        Map<String, Integer> map = new HashMap<>();
        int max = 0;
        for(int i = 0; i < N; i++) {
            String key = scanner.next();
            if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            }
        }

        List<String> listOfCountryNames = new ArrayList<>();
        for (String key : map.keySet()) {
            if(map.get(key) == max) {
                listOfCountryNames.add(key);
            }
        }

        java.util.Collections.sort(listOfCountryNames);

        for (String name : listOfCountryNames) {
            System.out.println(name);
        }

    }
} Main public static void main(String[] args) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args private void run() {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        Map<String, Integer> map = new HashMap<>();
        int max = 0;
        for(int i = 0; i < N; i++) {
            String key = scanner.next();
            if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            }
        }

        List<String> listOfCountryNames = new ArrayList<>();
        for (String key : map.keySet()) {
            if(map.get(key) == max) {
                listOfCountryNames.add(key);
            }
        }

        java.util.Collections.sort(listOfCountryNames);

        for (String name : listOfCountryNames) {
            System.out.println(name);
        }

    } run {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        Map<String, Integer> map = new HashMap<>();
        int max = 0;
        for(int i = 0; i < N; i++) {
            String key = scanner.next();
            if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            }
        }

        List<String> listOfCountryNames = new ArrayList<>();
        for (String key : map.keySet()) {
            if(map.get(key) == max) {
                listOfCountryNames.add(key);
            }
        }

        java.util.Collections.sort(listOfCountryNames);

        for (String name : listOfCountryNames) {
            System.out.println(name);
        }

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner Map<String, Integer> map = new HashMap<>(); map new HashMap<>() int max = 0; max 0 for(int i = 0; i < N; i++) {
            String key = scanner.next();
            if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            String key = scanner.next();
            if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            }
        } {
            String key = scanner.next();
            if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            }
        } String key = scanner.next(); key scanner.next() scanner.next scanner if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            } map.containsKey(key) map.containsKey map key {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            } map.put(key, map.get(key) + 1) map.put map key map.get(key) + 1 map.get(key) map.get map key 1 max = Math.max(max, map.get(key)) max Math.max(max, map.get(key)) Math.max Math max map.get(key) map.get map key {
                map.put(key, 1);
                max = Math.max(max, 1);
            } map.put(key, 1) map.put map key 1 max = Math.max(max, 1) max Math.max(max, 1) Math.max Math max 1 List<String> listOfCountryNames = new ArrayList<>(); listOfCountryNames new ArrayList<>() for (String key : map.keySet()) {
            if(map.get(key) == max) {
                listOfCountryNames.add(key);
            }
        } String key map.keySet() map.keySet map {
            if(map.get(key) == max) {
                listOfCountryNames.add(key);
            }
        } {
            if(map.get(key) == max) {
                listOfCountryNames.add(key);
            }
        } if(map.get(key) == max) {
                listOfCountryNames.add(key);
            } map.get(key) == max map.get(key) map.get map key max {
                listOfCountryNames.add(key);
            } listOfCountryNames.add(key) listOfCountryNames.add listOfCountryNames key java.util.Collections.sort(listOfCountryNames) java.util.Collections.sort java.util.Collections java.util java java.util java.util.Collections listOfCountryNames for (String name : listOfCountryNames) {
            System.out.println(name);
        } String name listOfCountryNames {
            System.out.println(name);
        } {
            System.out.println(name);
        } System.out.println(name) System.out.println System.out System System.out name public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        Map<String, Integer> map = new HashMap<>();
        int max = 0;
        for(int i = 0; i < N; i++) {
            String key = scanner.next();
            if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            }
        }

        List<String> listOfCountryNames = new ArrayList<>();
        for (String key : map.keySet()) {
            if(map.get(key) == max) {
                listOfCountryNames.add(key);
            }
        }

        java.util.Collections.sort(listOfCountryNames);

        for (String name : listOfCountryNames) {
            System.out.println(name);
        }

    }
} public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        Map<String, Integer> map = new HashMap<>();
        int max = 0;
        for(int i = 0; i < N; i++) {
            String key = scanner.next();
            if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            }
        }

        List<String> listOfCountryNames = new ArrayList<>();
        for (String key : map.keySet()) {
            if(map.get(key) == max) {
                listOfCountryNames.add(key);
            }
        }

        java.util.Collections.sort(listOfCountryNames);

        for (String name : listOfCountryNames) {
            System.out.println(name);
        }

    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        Map<String, Integer> map = new HashMap<>();
        int max = 0;
        for(int i = 0; i < N; i++) {
            String key = scanner.next();
            if(map.containsKey(key)) {
                map.put(key, map.get(key) + 1);
                max = Math.max(max, map.get(key));
            }else{
                map.put(key, 1);
                max = Math.max(max, 1);
            }
        }

        List<String> listOfCountryNames = new ArrayList<>();
        for (String key : map.keySet()) {
            if(map.get(key) == max) {
                listOfCountryNames.add(key);
            }
        }

        java.util.Collections.sort(listOfCountryNames);

        for (String name : listOfCountryNames) {
            System.out.println(name);
        }

    }
}
