from collections import Counter

N = int(input())

A = []
for _ in range(N):
    A.append(input().strip())

dic = Counter(A)

B = []
for a, c in dic.items():
    B.append((a,c))

B.sort(key=lambda x:x[0])
B.sort(key=lambda x:x[1],reverse=True)

r = B[0][1]
for b in B:
    p, q = b
    if q < r:
        exit()
    print(p) from collections import Counter N = int(input()) N int(input()) int input() input A = [] A [] for _ in range(N):
    A.append(input().strip()) _ range(N) range N A.append(input().strip()) A.append A append input().strip() ().strip () input strip dic = Counter(A) dic Counter(A) Counter A B = [] B [] for a, c in dic.items():
    B.append((a,c)) a c dic.items() dic.items dic items B.append((a,c)) B.append B append (a,c) a c B.sort(key=lambda x:x[0]) B.sort B sort key=lambda x:x[0] key lambda x:x[0] x[0] x 0 x B.sort(key=lambda x:x[1],reverse=True) B.sort B sort key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x reverse=True reverse True r = B[0][1] r B[0][1] [0] B 0 1 for b in B:
    p, q = b
    if q < r:
        exit()
    print(p) b B p, q = b p b q if q < r:
        exit()
     q < r q r exit() exit print(p) print p p, q = b b p B = [] [] B q = b b q dic = Counter(A) Counter(A) dic N = int(input()) int(input()) N A = [] [] A r = B[0][1] B[0][1] r
from collections import Counter

N = int(input())

A = []
for _ in range(N):
    A.append(input().strip())

dic = Counter(A)

B = []
for a, c in dic.items():
    B.append((a,c))

B.sort(key=lambda x:x[0])
B.sort(key=lambda x:x[1],reverse=True)

r = B[0][1]
for b in B:
    p, q = b
    if q < r:
        exit()
    print(p)