N = int(eval(input()))

Dic = {}

for n in range(N):

    S = eval(input())

    if S in list(Dic.keys()):

        Dic[S] = Dic[S] + 1

    else:

        Dic[S] = 1



max_val = max(Dic.values())

max_k_list = [kv[0] for kv in list(Dic.items()) if kv[1] == max_val]

max_k_list = sorted(max_k_list)

for t in max_k_list:

    print(t)
from collections import Counter

N = int(input())

#L = [input() for _ in range(N)]

L = []

for n in range(N):

    S = input()

    L.append(S)

Dic = Counter(L)

max_value = max(Dic.values())

max_k_list = [i for i, j in Dic.items() if j == max_value]

max_k_list = sorted(max_k_list)



print(*max_k_list , sep="\n")

N = int(eval(input()))
Dic = {}
for n in range(N):
    S = eval(input())
    if S in list(Dic.keys()):
        Dic[S] = Dic[S] + 1
    else:
        Dic[S] = 1
max_val = max(Dic.values())
max_k_list = [kv[0] for kv in list(Dic.items()) if kv[1] == max_val]
max_k_list = sorted(max_k_list)
for t in max_k_list:
    print(t)

from collections import Counter

N = int(input())
# L = [input() for _ in range(N)]
L = []
for n in range(N):
    S = input()
    L.append(S)
Dic = Counter(L)
max_value = max(Dic.values())
max_k_list = [i for i, j in Dic.items() if j == max_value]
max_k_list = sorted(max_k_list)
print(*max_k_list, sep="\n")

-N = int(eval(input())) -Dic = {} +from collections import Counter + +N = int(input()) +# L = [input() for _ in range(N)] +L = [] -    S = eval(input()) -    if S in list(Dic.keys()): -        Dic[S] = Dic[S] + 1 -    else: -        Dic[S] = 1 -max_val = max(Dic.values()) -max_k_list = [kv[0] for kv in list(Dic.items()) if kv[1] == max_val] +    S = input() +    L.append(S) +Dic = Counter(L) +max_value = max(Dic.values()) +max_k_list = [i for i, j in Dic.items() if j == max_value] -for t in max_k_list: -    print(t) +print(*max_k_list, sep="\n")