import java.util.*;
import java.util.Collections;
import java.util.ArrayList;

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

        int N = sc.nextInt();
        String[] S = new String[N];
        ArrayList<String> list = new ArrayList<String>();

        for(int i=0; i<N; i++){
            S[i] = sc.next();
            list.add(S[i]);
        }

        Collections.sort(list);

        int[] sum = new int[N];
        int x = 0;
        int max = 0;
        String[] ans = new String[N];
        for(int i=0; i<N; i++){
            sum[i] = 1;
        }
        for(int i=1; i<N; i++){
            if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            }
            if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            }
        }
        for(int i=0; i<=x; i++){
            if(sum[i]==max){
                System.out.println(ans[i]);
            }
        }
    }
} import java.util.*; util.* java import java.util.Collections; Collections java.util import java.util.ArrayList; ArrayList java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] S = new String[N];
        ArrayList<String> list = new ArrayList<String>();

        for(int i=0; i<N; i++){
            S[i] = sc.next();
            list.add(S[i]);
        }

        Collections.sort(list);

        int[] sum = new int[N];
        int x = 0;
        int max = 0;
        String[] ans = new String[N];
        for(int i=0; i<N; i++){
            sum[i] = 1;
        }
        for(int i=1; i<N; i++){
            if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            }
            if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            }
        }
        for(int i=0; i<=x; i++){
            if(sum[i]==max){
                System.out.println(ans[i]);
            }
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] S = new String[N];
        ArrayList<String> list = new ArrayList<String>();

        for(int i=0; i<N; i++){
            S[i] = sc.next();
            list.add(S[i]);
        }

        Collections.sort(list);

        int[] sum = new int[N];
        int x = 0;
        int max = 0;
        String[] ans = new String[N];
        for(int i=0; i<N; i++){
            sum[i] = 1;
        }
        for(int i=1; i<N; i++){
            if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            }
            if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            }
        }
        for(int i=0; i<=x; i++){
            if(sum[i]==max){
                System.out.println(ans[i]);
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] S = new String[N];
        ArrayList<String> list = new ArrayList<String>();

        for(int i=0; i<N; i++){
            S[i] = sc.next();
            list.add(S[i]);
        }

        Collections.sort(list);

        int[] sum = new int[N];
        int x = 0;
        int max = 0;
        String[] ans = new String[N];
        for(int i=0; i<N; i++){
            sum[i] = 1;
        }
        for(int i=1; i<N; i++){
            if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            }
            if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            }
        }
        for(int i=0; i<=x; i++){
            if(sum[i]==max){
                System.out.println(ans[i]);
            }
        }
    } 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 ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() for(int i=0; i<N; i++){
            S[i] = sc.next();
            list.add(S[i]);
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            S[i] = sc.next();
            list.add(S[i]);
        } {
            S[i] = sc.next();
            list.add(S[i]);
        } S[i] = sc.next() S[i] S i sc.next() sc.next sc list.add(S[i]) list.add list S[i] S i Collections.sort(list) Collections.sort Collections list int[] sum = new int[N]; sum new int[N] N int x = 0; x 0 int max = 0; max 0 String[] ans = new String[N]; ans new String[N] N for(int i=0; i<N; i++){
            sum[i] = 1;
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            sum[i] = 1;
        } {
            sum[i] = 1;
        } sum[i] = 1 sum[i] sum i 1 for(int i=1; i<N; i++){
            if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            }
            if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            }
        } int i=1; int i=1; i 1 i<N i N i++ i++ i {
            if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            }
            if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            }
        } {
            if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            }
            if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            }
        } if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            } list.get(i).equals(list.get(i-1)) list.get(i).equals list.get(i) list.get list i list.get(i-1) list.get list i-1 i 1 {
                sum[x] += 1;
            } sum[x] += 1 sum[x] sum x 1 {
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            } ans[x] = list.get(i - 1) ans[x] ans x list.get(i - 1) list.get list i - 1 i 1 max = Math.max(max, sum[x]) max Math.max(max, sum[x]) Math.max Math max sum[x] sum x x += 1 x 1 if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            } i==N-1 i N-1 N 1 {
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            } ans[x] = list.get(i) ans[x] ans x list.get(i) list.get list i max = Math.max(max, sum[x]) max Math.max(max, sum[x]) Math.max Math max sum[x] sum x for(int i=0; i<=x; i++){
            if(sum[i]==max){
                System.out.println(ans[i]);
            }
        } int i=0; int i=0; i 0 i<=x i x i++ i++ i {
            if(sum[i]==max){
                System.out.println(ans[i]);
            }
        } {
            if(sum[i]==max){
                System.out.println(ans[i]);
            }
        } if(sum[i]==max){
                System.out.println(ans[i]);
            } sum[i]==max sum[i] sum i max {
                System.out.println(ans[i]);
            } System.out.println(ans[i]) System.out.println System.out System System.out ans[i] ans i String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] S = new String[N];
        ArrayList<String> list = new ArrayList<String>();

        for(int i=0; i<N; i++){
            S[i] = sc.next();
            list.add(S[i]);
        }

        Collections.sort(list);

        int[] sum = new int[N];
        int x = 0;
        int max = 0;
        String[] ans = new String[N];
        for(int i=0; i<N; i++){
            sum[i] = 1;
        }
        for(int i=1; i<N; i++){
            if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            }
            if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            }
        }
        for(int i=0; i<=x; i++){
            if(sum[i]==max){
                System.out.println(ans[i]);
            }
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String[] S = new String[N];
        ArrayList<String> list = new ArrayList<String>();

        for(int i=0; i<N; i++){
            S[i] = sc.next();
            list.add(S[i]);
        }

        Collections.sort(list);

        int[] sum = new int[N];
        int x = 0;
        int max = 0;
        String[] ans = new String[N];
        for(int i=0; i<N; i++){
            sum[i] = 1;
        }
        for(int i=1; i<N; i++){
            if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            }
            if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            }
        }
        for(int i=0; i<=x; i++){
            if(sum[i]==max){
                System.out.println(ans[i]);
            }
        }
    }
} Main
import java.util.*;
import java.util.Collections;
import java.util.ArrayList;

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

        int N = sc.nextInt();
        String[] S = new String[N];
        ArrayList<String> list = new ArrayList<String>();

        for(int i=0; i<N; i++){
            S[i] = sc.next();
            list.add(S[i]);
        }

        Collections.sort(list);

        int[] sum = new int[N];
        int x = 0;
        int max = 0;
        String[] ans = new String[N];
        for(int i=0; i<N; i++){
            sum[i] = 1;
        }
        for(int i=1; i<N; i++){
            if(list.get(i).equals(list.get(i-1))){
                sum[x] += 1;
            }
            else{
                ans[x] = list.get(i - 1);
                max = Math.max(max, sum[x]);
                x += 1;
            }
            if(i==N-1){
                ans[x] = list.get(i);
                max = Math.max(max, sum[x]);
            }
        }
        for(int i=0; i<=x; i++){
            if(sum[i]==max){
                System.out.println(ans[i]);
            }
        }
    }
}
