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

public class Main {
	public static void main(String[] args) {
		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();
		}

		Arrays.sort(S);

		int max = 1;

		int b[] = new int[N];
		for(int i=0; i<N; i++) {
			b[i]=1;
		}

		for (int i = 1; i < N; i++) {
			if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			}
		}

		for (int i = 0; i < N; i++) {
			if (b[i] == max) {
				System.out.println(S[i]);
			}
		}
		sc.close();
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner 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];

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

		Arrays.sort(S);

		int max = 1;

		int b[] = new int[N];
		for(int i=0; i<N; i++) {
			b[i]=1;
		}

		for (int i = 1; i < N; i++) {
			if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			}
		}

		for (int i = 0; i < N; i++) {
			if (b[i] == max) {
				System.out.println(S[i]);
			}
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		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();
		}

		Arrays.sort(S);

		int max = 1;

		int b[] = new int[N];
		for(int i=0; i<N; i++) {
			b[i]=1;
		}

		for (int i = 1; i < N; i++) {
			if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			}
		}

		for (int i = 0; i < N; i++) {
			if (b[i] == max) {
				System.out.println(S[i]);
			}
		}
		sc.close();
	} main {
		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();
		}

		Arrays.sort(S);

		int max = 1;

		int b[] = new int[N];
		for(int i=0; i<N; i++) {
			b[i]=1;
		}

		for (int i = 1; i < N; i++) {
			if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			}
		}

		for (int i = 0; i < N; i++) {
			if (b[i] == max) {
				System.out.println(S[i]);
			}
		}
		sc.close();
	} 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 Arrays.sort(S) Arrays.sort Arrays S int max = 1; max 1 int b[] = new int[N]; b new int[N] N for(int i=0; i<N; i++) {
			b[i]=1;
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			b[i]=1;
		} {
			b[i]=1;
		} b[i]=1 b[i] b i 1 for (int i = 1; i < N; i++) {
			if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			}
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			}
		} {
			if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			}
		} if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			} S[i].equals(S[i - 1]) S[i].equals S[i] S i S[i - 1] S i - 1 i 1 {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			} b[i] = b[i - 1] + 1 b[i] b i b[i - 1] + 1 b[i - 1] b i - 1 i 1 1 if (b[i] > max) {
					max = b[i];
				} b[i] > max b[i] b i max {
					max = b[i];
				} max = b[i] max b[i] b i for (int i = 0; i < N; i++) {
			if (b[i] == max) {
				System.out.println(S[i]);
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if (b[i] == max) {
				System.out.println(S[i]);
			}
		} {
			if (b[i] == max) {
				System.out.println(S[i]);
			}
		} if (b[i] == max) {
				System.out.println(S[i]);
			} b[i] == max b[i] b i max {
				System.out.println(S[i]);
			} System.out.println(S[i]) System.out.println System.out System System.out S[i] S i sc.close() sc.close sc 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];

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

		Arrays.sort(S);

		int max = 1;

		int b[] = new int[N];
		for(int i=0; i<N; i++) {
			b[i]=1;
		}

		for (int i = 1; i < N; i++) {
			if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			}
		}

		for (int i = 0; i < N; i++) {
			if (b[i] == max) {
				System.out.println(S[i]);
			}
		}
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		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();
		}

		Arrays.sort(S);

		int max = 1;

		int b[] = new int[N];
		for(int i=0; i<N; i++) {
			b[i]=1;
		}

		for (int i = 1; i < N; i++) {
			if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			}
		}

		for (int i = 0; i < N; i++) {
			if (b[i] == max) {
				System.out.println(S[i]);
			}
		}
		sc.close();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		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();
		}

		Arrays.sort(S);

		int max = 1;

		int b[] = new int[N];
		for(int i=0; i<N; i++) {
			b[i]=1;
		}

		for (int i = 1; i < N; i++) {
			if (S[i].equals(S[i - 1])) {
				b[i] = b[i - 1] + 1;
				if (b[i] > max) {
					max = b[i];
				}
			}
		}

		for (int i = 0; i < N; i++) {
			if (b[i] == max) {
				System.out.println(S[i]);
			}
		}
		sc.close();
	}
}
