from collections import defaultdict, Counter

n  = int(input())
lis = [input() for _ in range(n)]

a = Counter(lis)

tmp = 0
for key, value in a.items():
    tmp = max(value, tmp)

ans =[]
for k, v in a.items():
    if v == tmp:
        ans.append(k)

for i in sorted(ans):
    print(i) from collections import defaultdict, Counter 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 lis = [input() for _ in range(n)] lis [input() for _ in range(n)] a = Counter(lis) a Counter(lis) Counter lis tmp = 0 tmp 0 for key, value in a.items():
    tmp = max(value, tmp) key value a.items() a.items a items tmp = max(value, tmp) tmp max(value, tmp) max value tmp ans =[] ans [] for k, v in a.items():
    if v == tmp:
        ans.append(k) k v a.items() a.items a items if v == tmp:
        ans.append(k) v == tmp v tmp ans.append(k) ans.append ans append k for i in sorted(ans):
    print(i) i sorted(ans) sorted ans print(i) print i ans =[] [] ans tmp = 0 0 tmp lis = [input() for _ in range(n)] [input() for _ in range(n)] lis tmp = max(value, tmp) max(value, tmp) tmp n  = int(input()) int(input()) n a = Counter(lis) Counter(lis) a
from collections import defaultdict, Counter

n  = int(input())
lis = [input() for _ in range(n)]

a = Counter(lis)

tmp = 0
for key, value in a.items():
    tmp = max(value, tmp)

ans =[]
for k, v in a.items():
    if v == tmp:
        ans.append(k)

for i in sorted(ans):
    print(i)