import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			int N = scan.nextInt();
			String[] S = new String[N];
			int[] count = new int[N];
			
			for(int i=0;i<N;i++) {
				S[i] =scan.next();
				count[i] = 1;
			}
			
			
			Arrays.sort(S);
			
			for(int i = 0;i<N-1;i++) {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			}
			
			
			int max = 1;
			for(int i =0;i<N;i++) {
				if(max<count[i]) {
					max = count[i];
				}
			}
			
			for(int i = 0;i<N;i++) {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
		}
		
		
	}
		

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			int N = scan.nextInt();
			String[] S = new String[N];
			int[] count = new int[N];
			
			for(int i=0;i<N;i++) {
				S[i] =scan.next();
				count[i] = 1;
			}
			
			
			Arrays.sort(S);
			
			for(int i = 0;i<N-1;i++) {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			}
			
			
			int max = 1;
			for(int i =0;i<N;i++) {
				if(max<count[i]) {
					max = count[i];
				}
			}
			
			for(int i = 0;i<N;i++) {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
		}
		
		
	}
		

} Main public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			int N = scan.nextInt();
			String[] S = new String[N];
			int[] count = new int[N];
			
			for(int i=0;i<N;i++) {
				S[i] =scan.next();
				count[i] = 1;
			}
			
			
			Arrays.sort(S);
			
			for(int i = 0;i<N-1;i++) {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			}
			
			
			int max = 1;
			for(int i =0;i<N;i++) {
				if(max<count[i]) {
					max = count[i];
				}
			}
			
			for(int i = 0;i<N;i++) {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
		}
		
		
	} main {
		try(Scanner scan = new Scanner(System.in)){
			int N = scan.nextInt();
			String[] S = new String[N];
			int[] count = new int[N];
			
			for(int i=0;i<N;i++) {
				S[i] =scan.next();
				count[i] = 1;
			}
			
			
			Arrays.sort(S);
			
			for(int i = 0;i<N-1;i++) {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			}
			
			
			int max = 1;
			for(int i =0;i<N;i++) {
				if(max<count[i]) {
					max = count[i];
				}
			}
			
			for(int i = 0;i<N;i++) {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
		}
		
		
	} try(Scanner scan = new Scanner(System.in)){
			int N = scan.nextInt();
			String[] S = new String[N];
			int[] count = new int[N];
			
			for(int i=0;i<N;i++) {
				S[i] =scan.next();
				count[i] = 1;
			}
			
			
			Arrays.sort(S);
			
			for(int i = 0;i<N-1;i++) {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			}
			
			
			int max = 1;
			for(int i =0;i<N;i++) {
				if(max<count[i]) {
					max = count[i];
				}
			}
			
			for(int i = 0;i<N;i++) {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
		} {
			int N = scan.nextInt();
			String[] S = new String[N];
			int[] count = new int[N];
			
			for(int i=0;i<N;i++) {
				S[i] =scan.next();
				count[i] = 1;
			}
			
			
			Arrays.sort(S);
			
			for(int i = 0;i<N-1;i++) {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			}
			
			
			int max = 1;
			for(int i =0;i<N;i++) {
				if(max<count[i]) {
					max = count[i];
				}
			}
			
			for(int i = 0;i<N;i++) {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
		} Scanner scan = new Scanner(System.in) Scanner scan = new Scanner(System.in) new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan String[] S = new String[N]; S new String[N] N int[] count = new int[N]; count new int[N] N for(int i=0;i<N;i++) {
				S[i] =scan.next();
				count[i] = 1;
			} int i=0; int i=0; i 0 i<N i N i++ i++ i {
				S[i] =scan.next();
				count[i] = 1;
			} {
				S[i] =scan.next();
				count[i] = 1;
			} S[i] =scan.next() S[i] S i scan.next() scan.next scan count[i] = 1 count[i] count i 1 Arrays.sort(S) Arrays.sort Arrays S for(int i = 0;i<N-1;i++) {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			} int i = 0; int i = 0; i 0 i<N-1 i N-1 N 1 i++ i++ i {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			} {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			} if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				} S[i].equals(S[i+1]) S[i].equals S[i] S i S[i+1] S i+1 i 1 {
					count[i+1]  =count[i]+1;
				} count[i+1]  =count[i]+1 count[i+1] count i+1 i 1 count[i]+1 count[i] count i 1 int max = 1; max 1 for(int i =0;i<N;i++) {
				if(max<count[i]) {
					max = count[i];
				}
			} int i =0; int i =0; i 0 i<N i N i++ i++ i {
				if(max<count[i]) {
					max = count[i];
				}
			} {
				if(max<count[i]) {
					max = count[i];
				}
			} if(max<count[i]) {
					max = count[i];
				} max<count[i] max count[i] count i {
					max = count[i];
				} max = count[i] max count[i] count i for(int i = 0;i<N;i++) {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			} {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			} if(count[i]==max) {
					System.out.println(S[i]);
				} count[i]==max count[i] count i max {
					System.out.println(S[i]);
				} System.out.println(S[i]) System.out.println System.out System System.out S[i] S i String[]args args public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			int N = scan.nextInt();
			String[] S = new String[N];
			int[] count = new int[N];
			
			for(int i=0;i<N;i++) {
				S[i] =scan.next();
				count[i] = 1;
			}
			
			
			Arrays.sort(S);
			
			for(int i = 0;i<N-1;i++) {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			}
			
			
			int max = 1;
			for(int i =0;i<N;i++) {
				if(max<count[i]) {
					max = count[i];
				}
			}
			
			for(int i = 0;i<N;i++) {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
		}
		
		
	}
		

} public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			int N = scan.nextInt();
			String[] S = new String[N];
			int[] count = new int[N];
			
			for(int i=0;i<N;i++) {
				S[i] =scan.next();
				count[i] = 1;
			}
			
			
			Arrays.sort(S);
			
			for(int i = 0;i<N-1;i++) {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			}
			
			
			int max = 1;
			for(int i =0;i<N;i++) {
				if(max<count[i]) {
					max = count[i];
				}
			}
			
			for(int i = 0;i<N;i++) {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
		}
		
		
	}
		

} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			int N = scan.nextInt();
			String[] S = new String[N];
			int[] count = new int[N];
			
			for(int i=0;i<N;i++) {
				S[i] =scan.next();
				count[i] = 1;
			}
			
			
			Arrays.sort(S);
			
			for(int i = 0;i<N-1;i++) {
				if(S[i].equals(S[i+1])) {
					count[i+1]  =count[i]+1;
				}
				
			}
			
			
			int max = 1;
			for(int i =0;i<N;i++) {
				if(max<count[i]) {
					max = count[i];
				}
			}
			
			for(int i = 0;i<N;i++) {
				if(count[i]==max) {
					System.out.println(S[i]);
				}
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
		}
		
		
	}
		

}
