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

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 sum = 1;
	String check = S[0];
	for (int i = 1; i < N; i++) {
	    if (check.equals(S[i])) {
		sum++;

		if (sum > max)
		    max = sum;
	    } else {
		check = S[i];
		sum = 1;
	    }
	}

	if (max == 1) {
	    for (int i = 0; i < N; i++)
		System.out.println(S[i]);
	} else {
	    check = S[0];
	    sum = 1;
	    for (int i = 1; i < N; i++) {
		if (check.equals(S[i])) {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} else {
		    check = S[i];
		    sum = 1;
		}
	    }
	}
		
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util 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 sum = 1;
	String check = S[0];
	for (int i = 1; i < N; i++) {
	    if (check.equals(S[i])) {
		sum++;

		if (sum > max)
		    max = sum;
	    } else {
		check = S[i];
		sum = 1;
	    }
	}

	if (max == 1) {
	    for (int i = 0; i < N; i++)
		System.out.println(S[i]);
	} else {
	    check = S[0];
	    sum = 1;
	    for (int i = 1; i < N; i++) {
		if (check.equals(S[i])) {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} else {
		    check = S[i];
		    sum = 1;
		}
	    }
	}
		
    }
} 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 sum = 1;
	String check = S[0];
	for (int i = 1; i < N; i++) {
	    if (check.equals(S[i])) {
		sum++;

		if (sum > max)
		    max = sum;
	    } else {
		check = S[i];
		sum = 1;
	    }
	}

	if (max == 1) {
	    for (int i = 0; i < N; i++)
		System.out.println(S[i]);
	} else {
	    check = S[0];
	    sum = 1;
	    for (int i = 1; i < N; i++) {
		if (check.equals(S[i])) {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} else {
		    check = S[i];
		    sum = 1;
		}
	    }
	}
		
    } 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 sum = 1;
	String check = S[0];
	for (int i = 1; i < N; i++) {
	    if (check.equals(S[i])) {
		sum++;

		if (sum > max)
		    max = sum;
	    } else {
		check = S[i];
		sum = 1;
	    }
	}

	if (max == 1) {
	    for (int i = 0; i < N; i++)
		System.out.println(S[i]);
	} else {
	    check = S[0];
	    sum = 1;
	    for (int i = 1; i < N; i++) {
		if (check.equals(S[i])) {
		    sum++;

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

		if (sum > max)
		    max = sum;
	    } else {
		check = S[i];
		sum = 1;
	    }
	} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
	    if (check.equals(S[i])) {
		sum++;

		if (sum > max)
		    max = sum;
	    } else {
		check = S[i];
		sum = 1;
	    }
	} {
	    if (check.equals(S[i])) {
		sum++;

		if (sum > max)
		    max = sum;
	    } else {
		check = S[i];
		sum = 1;
	    }
	} if (check.equals(S[i])) {
		sum++;

		if (sum > max)
		    max = sum;
	    } else {
		check = S[i];
		sum = 1;
	    } check.equals(S[i]) check.equals check S[i] S i {
		sum++;

		if (sum > max)
		    max = sum;
	    } sum++ sum if (sum > max)
		    max = sum; sum > max sum max max = sum max sum {
		check = S[i];
		sum = 1;
	    } check = S[i] check S[i] S i sum = 1 sum 1 if (max == 1) {
	    for (int i = 0; i < N; i++)
		System.out.println(S[i]);
	} else {
	    check = S[0];
	    sum = 1;
	    for (int i = 1; i < N; i++) {
		if (check.equals(S[i])) {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} else {
		    check = S[i];
		    sum = 1;
		}
	    }
	} max == 1 max 1 {
	    for (int i = 0; i < N; i++)
		System.out.println(S[i]);
	} for (int i = 0; i < N; i++)
		System.out.println(S[i]); int i = 0; int i = 0; i 0 i < N i N i++ i++ i System.out.println(S[i]); System.out.println(S[i]) System.out.println System.out System System.out S[i] S i {
	    check = S[0];
	    sum = 1;
	    for (int i = 1; i < N; i++) {
		if (check.equals(S[i])) {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} else {
		    check = S[i];
		    sum = 1;
		}
	    }
	} check = S[0] check S[0] S 0 sum = 1 sum 1 for (int i = 1; i < N; i++) {
		if (check.equals(S[i])) {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} else {
		    check = S[i];
		    sum = 1;
		}
	    } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
		if (check.equals(S[i])) {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} else {
		    check = S[i];
		    sum = 1;
		}
	    } {
		if (check.equals(S[i])) {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} else {
		    check = S[i];
		    sum = 1;
		}
	    } if (check.equals(S[i])) {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} else {
		    check = S[i];
		    sum = 1;
		} check.equals(S[i]) check.equals check S[i] S i {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} sum++ sum if (sum == max)
			System.out.println(S[i]); sum == max sum max System.out.println(S[i]) System.out.println System.out System System.out S[i] S i {
		    check = S[i];
		    sum = 1;
		} check = S[i] check S[i] S i sum = 1 sum 1 String[] args args
import java.util.Arrays;
import java.util.Scanner;

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 sum = 1;
	String check = S[0];
	for (int i = 1; i < N; i++) {
	    if (check.equals(S[i])) {
		sum++;

		if (sum > max)
		    max = sum;
	    } else {
		check = S[i];
		sum = 1;
	    }
	}

	if (max == 1) {
	    for (int i = 0; i < N; i++)
		System.out.println(S[i]);
	} else {
	    check = S[0];
	    sum = 1;
	    for (int i = 1; i < N; i++) {
		if (check.equals(S[i])) {
		    sum++;

		    if (sum == max)
			System.out.println(S[i]);
		} else {
		    check = S[i];
		    sum = 1;
		}
	    }
	}
		
    }
}