from collections import Counter

N = int(input())
S = [input() for _ in range(N)]
S.sort()
s = Counter(S)
max_len = max([n for n in s.values()])
#print("------------------")
for a, b in s.items():
    if b == max_len:
        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.sort() S.sort S sort s = Counter(S) s Counter(S) Counter S n for n in s.values() for n in s.values() n s.values() s.values s values for n in s.values() n max_len = max([n for n in s.values()]) max_len max([n for n in s.values()]) max [n for n in s.values()] for a, b in s.items():
    if b == max_len:
        print(a) a b s.items() s.items s items if b == max_len:
        print(a) b == max_len b max_len print(a) print a S = [input() for _ in range(N)] [input() for _ in range(N)] S s = Counter(S) Counter(S) s N = int(input()) int(input()) N max_len = max([n for n in s.values()]) max([n for n in s.values()]) max_len
from collections import Counter

N = int(input())
S = [input() for _ in range(N)]
S.sort()
s = Counter(S)
max_len = max([n for n in s.values()])
#print("------------------")
for a, b in s.items():
    if b == max_len:
        print(a)