N = int(eval(input()))



S = {}



A = [""]*N

for i in range(0, N):

    A[i] = A[i] + eval(input())



for i in range(0, N):

    if not (A[i] in list(S.keys())):

        S[A[i]] = 1

    else:

        S[A[i]] = S[A[i]] + 1



max = 0

for value in list(S.values()):

    if value > max:

        max = value



S0 = {}

n = 0

for key, value in list(S.items()):

    if value == max:

        S0[key] = 0

        n += 1



T = [""]*n

i = 0

for key in list(S0.keys()):

    T[i] = key

    i += 1



T.sort()

for p in range(0, n):

    print((T[p]))

from collections import Counter

N = int(eval(input()))

S = [eval(input()) for i in range(N)]

C = Counter(S)

dekai = max(C.values())

M = [kv[0] for kv in list(C.items()) if kv[1] == dekai]

M.sort()

A = '\n'.join(M)

print(A)
N = int(eval(input()))
S = {}
A = [""] * N
for i in range(0, N):
    A[i] = A[i] + eval(input())
for i in range(0, N):
    if not (A[i] in list(S.keys())):
        S[A[i]] = 1
    else:
        S[A[i]] = S[A[i]] + 1
max = 0
for value in list(S.values()):
    if value > max:
        max = value
S0 = {}
n = 0
for key, value in list(S.items()):
    if value == max:
        S0[key] = 0
        n += 1
T = [""] * n
i = 0
for key in list(S0.keys()):
    T[i] = key
    i += 1
T.sort()
for p in range(0, n):
    print((T[p]))

from collections import Counter

N = int(eval(input()))
S = [eval(input()) for i in range(N)]
C = Counter(S)
dekai = max(C.values())
M = [kv[0] for kv in list(C.items()) if kv[1] == dekai]
M.sort()
A = "\n".join(M)
print(A)

+from collections import Counter + -S = {} -A = [""] * N -for i in range(0, N): -    A[i] = A[i] + eval(input()) -for i in range(0, N): -    if not (A[i] in list(S.keys())): -        S[A[i]] = 1 -    else: -        S[A[i]] = S[A[i]] + 1 -max = 0 -for value in list(S.values()): -    if value > max: -        max = value -S0 = {} -n = 0 -for key, value in list(S.items()): -    if value == max: -        S0[key] = 0 -        n += 1 -T = [""] * n -i = 0 -for key in list(S0.keys()): -    T[i] = key -    i += 1 -T.sort() -for p in range(0, n): -    print((T[p])) +S = [eval(input()) for i in range(N)] +C = Counter(S) +dekai = max(C.values()) +M = [kv[0] for kv in list(C.items()) if kv[1] == dekai] +M.sort() +A = "\n".join(M) +print(A)