import collections

N = int(input())
S = [input() for _ in range(N)]

c = collections.Counter(S)

max_num = max(c.values())

l = []
for item in c.items():
    k = item[0]
    v = item[1]
    if v == max_num:
        l.append(k)

l.sort()

for li in l:
    print(li) import collections collections 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)] c = collections.Counter(S) c collections.Counter(S) collections.Counter collections Counter S max_num = max(c.values()) max_num max(c.values()) max c.values() c.values c values l = [] l [] for item in c.items():
    k = item[0]
    v = item[1]
    if v == max_num:
        l.append(k) item c.items() c.items c items k = item[0] k item[0] item 0 v = item[1] v item[1] item 1 if v == max_num:
        l.append(k) v == max_num v max_num l.append(k) l.append l append k l.sort() l.sort l sort for li in l:
    print(li) li l print(li) print li k = item[0] item[0] k l = [] [] l c = collections.Counter(S) collections.Counter(S) c v = item[1] item[1] v N = int(input()) int(input()) N max_num = max(c.values()) max(c.values()) max_num S = [input() for _ in range(N)] [input() for _ in range(N)] S
import collections

N = int(input())
S = [input() for _ in range(N)]

c = collections.Counter(S)

max_num = max(c.values())

l = []
for item in c.items():
    k = item[0]
    v = item[1]
    if v == max_num:
        l.append(k)

l.sort()

for li in l:
    print(li)
