
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();
        String A;
        TreeMap<String,Integer> B=new TreeMap<>();
        int max=0;
        int count;
        for (int i = 0; i < N; i++) {
            A = sc.next();
            if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            }
            max=Math.max(B.get(A), max);
        }

        //System.out.println(B.toString());

        for (String str : B.keySet()) {
            if (B.get(str)==max) {
                System.out.println(str);
            }
        }
    }
} 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();
        String A;
        TreeMap<String,Integer> B=new TreeMap<>();
        int max=0;
        int count;
        for (int i = 0; i < N; i++) {
            A = sc.next();
            if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            }
            max=Math.max(B.get(A), max);
        }

        //System.out.println(B.toString());

        for (String str : B.keySet()) {
            if (B.get(str)==max) {
                System.out.println(str);
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String A;
        TreeMap<String,Integer> B=new TreeMap<>();
        int max=0;
        int count;
        for (int i = 0; i < N; i++) {
            A = sc.next();
            if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            }
            max=Math.max(B.get(A), max);
        }

        //System.out.println(B.toString());

        for (String str : B.keySet()) {
            if (B.get(str)==max) {
                System.out.println(str);
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String A;
        TreeMap<String,Integer> B=new TreeMap<>();
        int max=0;
        int count;
        for (int i = 0; i < N; i++) {
            A = sc.next();
            if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            }
            max=Math.max(B.get(A), max);
        }

        //System.out.println(B.toString());

        for (String str : B.keySet()) {
            if (B.get(str)==max) {
                System.out.println(str);
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String A; A TreeMap<String,Integer> B=new TreeMap<>(); B new TreeMap<>() int max=0; max 0 int count; count for (int i = 0; i < N; i++) {
            A = sc.next();
            if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            }
            max=Math.max(B.get(A), max);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            A = sc.next();
            if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            }
            max=Math.max(B.get(A), max);
        } {
            A = sc.next();
            if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            }
            max=Math.max(B.get(A), max);
        } A = sc.next() A sc.next() sc.next sc if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            } B.containsKey(A) B.containsKey B A {
                count=B.get(A)+1;
                B.put(A, count);
            } count=B.get(A)+1 count B.get(A)+1 B.get(A) B.get B A 1 B.put(A, count) B.put B A count {
                B.put(A, 1);
            } B.put(A, 1) B.put B A 1 max=Math.max(B.get(A), max) max Math.max(B.get(A), max) Math.max Math B.get(A) B.get B A max for (String str : B.keySet()) {
            if (B.get(str)==max) {
                System.out.println(str);
            }
        } String str B.keySet() B.keySet B {
            if (B.get(str)==max) {
                System.out.println(str);
            }
        } {
            if (B.get(str)==max) {
                System.out.println(str);
            }
        } if (B.get(str)==max) {
                System.out.println(str);
            } B.get(str)==max B.get(str) B.get B str max {
                System.out.println(str);
            } System.out.println(str) System.out.println System.out System System.out str String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String A;
        TreeMap<String,Integer> B=new TreeMap<>();
        int max=0;
        int count;
        for (int i = 0; i < N; i++) {
            A = sc.next();
            if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            }
            max=Math.max(B.get(A), max);
        }

        //System.out.println(B.toString());

        for (String str : B.keySet()) {
            if (B.get(str)==max) {
                System.out.println(str);
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String A;
        TreeMap<String,Integer> B=new TreeMap<>();
        int max=0;
        int count;
        for (int i = 0; i < N; i++) {
            A = sc.next();
            if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            }
            max=Math.max(B.get(A), max);
        }

        //System.out.println(B.toString());

        for (String str : B.keySet()) {
            if (B.get(str)==max) {
                System.out.println(str);
            }
        }
    }
} Main

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();
        String A;
        TreeMap<String,Integer> B=new TreeMap<>();
        int max=0;
        int count;
        for (int i = 0; i < N; i++) {
            A = sc.next();
            if (B.containsKey(A)) {
                count=B.get(A)+1;
                B.put(A, count);
            }else{
                B.put(A, 1);
            }
            max=Math.max(B.get(A), max);
        }

        //System.out.println(B.toString());

        for (String str : B.keySet()) {
            if (B.get(str)==max) {
                System.out.println(str);
            }
        }
    }
}