import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (String t : s) {
            if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            }
        }
        int min = 0;
        for (Entry<String, Integer> entry : map.entrySet()) {
            min = Math.max(min, entry.getValue());
        }
        Set<String> set = new TreeSet<>();
        for (Entry<String, Integer> entry : map.entrySet()) {
            if (entry.getValue() == min) set.add(entry.getKey());
        }
        for (String t : set) {
            System.out.println(t);
        }
    }

} import java.util.HashMap; HashMap java.util 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.Set; Set java.util import java.util.TreeSet; TreeSet java.util public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (String t : s) {
            if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            }
        }
        int min = 0;
        for (Entry<String, Integer> entry : map.entrySet()) {
            min = Math.max(min, entry.getValue());
        }
        Set<String> set = new TreeSet<>();
        for (Entry<String, Integer> entry : map.entrySet()) {
            if (entry.getValue() == min) set.add(entry.getKey());
        }
        for (String t : set) {
            System.out.println(t);
        }
    }

} Main public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (String t : s) {
            if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            }
        }
        int min = 0;
        for (Entry<String, Integer> entry : map.entrySet()) {
            min = Math.max(min, entry.getValue());
        }
        Set<String> set = new TreeSet<>();
        for (Entry<String, Integer> entry : map.entrySet()) {
            if (entry.getValue() == min) set.add(entry.getKey());
        }
        for (String t : set) {
            System.out.println(t);
        }
    } main {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (String t : s) {
            if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            }
        }
        int min = 0;
        for (Entry<String, Integer> entry : map.entrySet()) {
            min = Math.max(min, entry.getValue());
        }
        Set<String> set = new TreeSet<>();
        for (Entry<String, Integer> entry : map.entrySet()) {
            if (entry.getValue() == min) set.add(entry.getKey());
        }
        for (String t : set) {
            System.out.println(t);
        }
    } @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] s = new String[n]; s new String[n] n for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            s[i] = sc.next();
        } {
            s[i] = sc.next();
        } s[i] = sc.next() s[i] s i sc.next() sc.next sc Map<String, Integer> map = new HashMap<String, Integer>(); map new HashMap<String, Integer>() for (String t : s) {
            if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            }
        } String t s {
            if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            }
        } {
            if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            }
        } if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            } map.containsKey(t) map.containsKey map t {
                map.put(t, map.get(t) + 1);
            } map.put(t, map.get(t) + 1) map.put map t map.get(t) + 1 map.get(t) map.get map t 1 {
                map.put(t, 1);
            } map.put(t, 1) map.put map t 1 int min = 0; min 0 for (Entry<String, Integer> entry : map.entrySet()) {
            min = Math.max(min, entry.getValue());
        } Entry<String, Integer> entry map.entrySet() map.entrySet map {
            min = Math.max(min, entry.getValue());
        } {
            min = Math.max(min, entry.getValue());
        } min = Math.max(min, entry.getValue()) min Math.max(min, entry.getValue()) Math.max Math min entry.getValue() entry.getValue entry Set<String> set = new TreeSet<>(); set new TreeSet<>() for (Entry<String, Integer> entry : map.entrySet()) {
            if (entry.getValue() == min) set.add(entry.getKey());
        } Entry<String, Integer> entry map.entrySet() map.entrySet map {
            if (entry.getValue() == min) set.add(entry.getKey());
        } {
            if (entry.getValue() == min) set.add(entry.getKey());
        } if (entry.getValue() == min) set.add(entry.getKey()); entry.getValue() == min entry.getValue() entry.getValue entry min set.add(entry.getKey()) set.add set entry.getKey() entry.getKey entry for (String t : set) {
            System.out.println(t);
        } String t set {
            System.out.println(t);
        } {
            System.out.println(t);
        } System.out.println(t) System.out.println System.out System System.out t String[] args args public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (String t : s) {
            if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            }
        }
        int min = 0;
        for (Entry<String, Integer> entry : map.entrySet()) {
            min = Math.max(min, entry.getValue());
        }
        Set<String> set = new TreeSet<>();
        for (Entry<String, Integer> entry : map.entrySet()) {
            if (entry.getValue() == min) set.add(entry.getKey());
        }
        for (String t : set) {
            System.out.println(t);
        }
    }

} public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (String t : s) {
            if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            }
        }
        int min = 0;
        for (Entry<String, Integer> entry : map.entrySet()) {
            min = Math.max(min, entry.getValue());
        }
        Set<String> set = new TreeSet<>();
        for (Entry<String, Integer> entry : map.entrySet()) {
            if (entry.getValue() == min) set.add(entry.getKey());
        }
        for (String t : set) {
            System.out.println(t);
        }
    }

} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0 ; i < n ; i++) {
            s[i] = sc.next();
        }
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (String t : s) {
            if (map.containsKey(t)) {
                map.put(t, map.get(t) + 1);
            } else {
                map.put(t, 1);
            }
        }
        int min = 0;
        for (Entry<String, Integer> entry : map.entrySet()) {
            min = Math.max(min, entry.getValue());
        }
        Set<String> set = new TreeSet<>();
        for (Entry<String, Integer> entry : map.entrySet()) {
            if (entry.getValue() == min) set.add(entry.getKey());
        }
        for (String t : set) {
            System.out.println(t);
        }
    }

}