from  collections import Counter
N = int(input())
S = [input() for _ in range(N)]

S = dict(Counter(S))
m = max(S.values())

ans = []
for s, v in S.items():
    if v == m:
        ans.append(s)
ans.sort()

for a in ans:
    print(a) from  collections import 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 S = [input() for _ in range(N)] S [input() for _ in range(N)] S = dict(Counter(S)) S dict(Counter(S)) dict Counter(S) Counter S m = max(S.values()) m max(S.values()) max S.values() S.values S values ans = [] ans [] for s, v in S.items():
    if v == m:
        ans.append(s) s v S.items() S.items S items if v == m:
        ans.append(s) v == m v m ans.append(s) ans.append ans append s ans.sort() ans.sort ans sort for a in ans:
    print(a) a ans print(a) print a S = dict(Counter(S)) dict(Counter(S)) S ans = [] [] ans S = [input() for _ in range(N)] [input() for _ in range(N)] S m = max(S.values()) max(S.values()) m N = int(input()) int(input()) N
from  collections import Counter
N = int(input())
S = [input() for _ in range(N)]

S = dict(Counter(S))
m = max(S.values())

ans = []
for s, v in S.items():
    if v == m:
        ans.append(s)
ans.sort()

for a in ans:
    print(a)
