from collections import Counter

N = int(input())
S = [input() for _ in range(N)]
l = Counter(S)
MAXNUM = max(l.values())

for s in sorted(list(set(S))):
    if l[s] == MAXNUM:
        print(s) 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)] l = Counter(S) l Counter(S) Counter S MAXNUM = max(l.values()) MAXNUM max(l.values()) max l.values() l.values l values for s in sorted(list(set(S))):
    if l[s] == MAXNUM:
        print(s) s sorted(list(set(S))) sorted list(set(S)) list set(S) set S if l[s] == MAXNUM:
        print(s) l[s] == MAXNUM l[s] l s MAXNUM print(s) print s l = Counter(S) Counter(S) l S = [input() for _ in range(N)] [input() for _ in range(N)] S MAXNUM = max(l.values()) max(l.values()) MAXNUM N = int(input()) int(input()) N
from collections import Counter

N = int(input())
S = [input() for _ in range(N)]
l = Counter(S)
MAXNUM = max(l.values())

for s in sorted(list(set(S))):
    if l[s] == MAXNUM:
        print(s)