#C - Poll
N = int(input())
S = [input() for _ in range(N)]
S_set = list(sorted(set(S)))

counter = {}
for k in S_set:
    counter[k] = 0
for i in S:
    counter[i] += 1
    
maxim = max(counter.values())
ans = [i for i in S if counter[i] == maxim]
ans = list(sorted(set(ans))) 

for j in ans:
    print(j) N = int(input()) N int(input()) int input() input input() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) input() input S = [input() for _ in range(N)] S [input() for _ in range(N)] S_set = list(sorted(set(S))) S_set list(sorted(set(S))) list sorted(set(S)) sorted set(S) set S counter = {} counter {} for k in S_set:
    counter[k] = 0 k S_set counter[k] = 0 counter[k] counter k 0 for i in S:
    counter[i] += 1
     i S counter[i] += 1 counter[i] counter i 1 maxim = max(counter.values()) maxim max(counter.values()) max counter.values() counter.values counter values i for i in S if counter[i] == maxim for i in S if counter[i] == maxim i S counter[i] == maxim counter[i] counter i maxim if counter[i] == maxim i ans = [i for i in S if counter[i] == maxim] ans [i for i in S if counter[i] == maxim] ans = list(sorted(set(ans))) ans list(sorted(set(ans))) list sorted(set(ans)) sorted set(ans) set ans for j in ans:
    print(j) j ans print(j) print j counter = {} {} counter maxim = max(counter.values()) max(counter.values()) maxim N = int(input()) int(input()) N ans = list(sorted(set(ans))) list(sorted(set(ans))) ans S_set = list(sorted(set(S))) list(sorted(set(S))) S_set ans = [i for i in S if counter[i] == maxim] [i for i in S if counter[i] == maxim] ans S = [input() for _ in range(N)] [input() for _ in range(N)] S
#C - Poll
N = int(input())
S = [input() for _ in range(N)]
S_set = list(sorted(set(S)))

counter = {}
for k in S_set:
    counter[k] = 0
for i in S:
    counter[i] += 1
    
maxim = max(counter.values())
ans = [i for i in S if counter[i] == maxim]
ans = list(sorted(set(ans))) 

for j in ans:
    print(j)