import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;

public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] list = new String[n];
        int count = 1;
        int max = 1;
        List<String> ans = new ArrayList<String>();
        for(int i = 0; i < n ; i++){
            list[i] = input.readLine();
        }
        Arrays.sort(list);
        for(int j = 0; j < n ; j++){
            if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max < count){
                max = count;
            }
        }
        Arrays.sort(list);
        count = 1;
        for(int k = 0; k < n ; k++){
            if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max == count){
                ans.add(list[k]);
            }
        }
        for(int l = 0; l < ans.size(); l++){
        System.out.println(ans.get(l));
        }

    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.HashSet; HashSet java.util import java.util.List; List java.util public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] list = new String[n];
        int count = 1;
        int max = 1;
        List<String> ans = new ArrayList<String>();
        for(int i = 0; i < n ; i++){
            list[i] = input.readLine();
        }
        Arrays.sort(list);
        for(int j = 0; j < n ; j++){
            if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max < count){
                max = count;
            }
        }
        Arrays.sort(list);
        count = 1;
        for(int k = 0; k < n ; k++){
            if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max == count){
                ans.add(list[k]);
            }
        }
        for(int l = 0; l < ans.size(); l++){
        System.out.println(ans.get(l));
        }

    }
} Main public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] list = new String[n];
        int count = 1;
        int max = 1;
        List<String> ans = new ArrayList<String>();
        for(int i = 0; i < n ; i++){
            list[i] = input.readLine();
        }
        Arrays.sort(list);
        for(int j = 0; j < n ; j++){
            if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max < count){
                max = count;
            }
        }
        Arrays.sort(list);
        count = 1;
        for(int k = 0; k < n ; k++){
            if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max == count){
                ans.add(list[k]);
            }
        }
        for(int l = 0; l < ans.size(); l++){
        System.out.println(ans.get(l));
        }

    } main {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] list = new String[n];
        int count = 1;
        int max = 1;
        List<String> ans = new ArrayList<String>();
        for(int i = 0; i < n ; i++){
            list[i] = input.readLine();
        }
        Arrays.sort(list);
        for(int j = 0; j < n ; j++){
            if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max < count){
                max = count;
            }
        }
        Arrays.sort(list);
        count = 1;
        for(int k = 0; k < n ; k++){
            if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max == count){
                ans.add(list[k]);
            }
        }
        for(int l = 0; l < ans.size(); l++){
        System.out.println(ans.get(l));
        }

    } BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(input.readLine()); n Integer.parseInt(input.readLine()) Integer.parseInt Integer input.readLine() input.readLine input String[] list = new String[n]; list new String[n] n int count = 1; count 1 int max = 1; max 1 List<String> ans = new ArrayList<String>(); ans new ArrayList<String>() for(int i = 0; i < n ; i++){
            list[i] = input.readLine();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            list[i] = input.readLine();
        } {
            list[i] = input.readLine();
        } list[i] = input.readLine() list[i] list i input.readLine() input.readLine input Arrays.sort(list) Arrays.sort Arrays list for(int j = 0; j < n ; j++){
            if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max < count){
                max = count;
            }
        } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
            if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max < count){
                max = count;
            }
        } {
            if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max < count){
                max = count;
            }
        } if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            } j > 0 j 0 {
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            } if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                } list[j].equals(list[j-1]) list[j].equals list[j] list j list[j-1] list j-1 j 1 {
                    count++;
                } count++ count {
                    count = 1;
                } count = 1 count 1 if(max < count){
                max = count;
            } max < count max count {
                max = count;
            } max = count max count Arrays.sort(list) Arrays.sort Arrays list count = 1 count 1 for(int k = 0; k < n ; k++){
            if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max == count){
                ans.add(list[k]);
            }
        } int k = 0; int k = 0; k 0 k < n k n k++ k++ k {
            if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max == count){
                ans.add(list[k]);
            }
        } {
            if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max == count){
                ans.add(list[k]);
            }
        } if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            } k > 0 k 0 {
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            } if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                } list[k].equals(list[k-1]) list[k].equals list[k] list k list[k-1] list k-1 k 1 {
                    count++;
                } count++ count {
                    count = 1;
                } count = 1 count 1 if(max == count){
                ans.add(list[k]);
            } max == count max count {
                ans.add(list[k]);
            } ans.add(list[k]) ans.add ans list[k] list k for(int l = 0; l < ans.size(); l++){
        System.out.println(ans.get(l));
        } int l = 0; int l = 0; l 0 l < ans.size() l ans.size() ans.size ans l++ l++ l {
        System.out.println(ans.get(l));
        } {
        System.out.println(ans.get(l));
        } System.out.println(ans.get(l)) System.out.println System.out System System.out ans.get(l) ans.get ans l String[] args args public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] list = new String[n];
        int count = 1;
        int max = 1;
        List<String> ans = new ArrayList<String>();
        for(int i = 0; i < n ; i++){
            list[i] = input.readLine();
        }
        Arrays.sort(list);
        for(int j = 0; j < n ; j++){
            if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max < count){
                max = count;
            }
        }
        Arrays.sort(list);
        count = 1;
        for(int k = 0; k < n ; k++){
            if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max == count){
                ans.add(list[k]);
            }
        }
        for(int l = 0; l < ans.size(); l++){
        System.out.println(ans.get(l));
        }

    }
} public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] list = new String[n];
        int count = 1;
        int max = 1;
        List<String> ans = new ArrayList<String>();
        for(int i = 0; i < n ; i++){
            list[i] = input.readLine();
        }
        Arrays.sort(list);
        for(int j = 0; j < n ; j++){
            if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max < count){
                max = count;
            }
        }
        Arrays.sort(list);
        count = 1;
        for(int k = 0; k < n ; k++){
            if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max == count){
                ans.add(list[k]);
            }
        }
        for(int l = 0; l < ans.size(); l++){
        System.out.println(ans.get(l));
        }

    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;

public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] list = new String[n];
        int count = 1;
        int max = 1;
        List<String> ans = new ArrayList<String>();
        for(int i = 0; i < n ; i++){
            list[i] = input.readLine();
        }
        Arrays.sort(list);
        for(int j = 0; j < n ; j++){
            if(j > 0){
                if (list[j].equals(list[j-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max < count){
                max = count;
            }
        }
        Arrays.sort(list);
        count = 1;
        for(int k = 0; k < n ; k++){
            if(k > 0){
                if (list[k].equals(list[k-1])){
                    count++;
                }else{
                    count = 1;
                }
            }
            if(max == count){
                ans.add(list[k]);
            }
        }
        for(int l = 0; l < ans.size(); l++){
        System.out.println(ans.get(l));
        }

    }
}