from collections import defaultdict



n = int(eval(input()))



s_dict = defaultdict(int)

for _ in range(n):

    s = eval(input())

    s_dict[s] += 1



count_max = max(s_dict.values())

s_list = sorted([s for s, count in list(s_dict.items()) if count == count_max])

for s in s_list:

    print(s)
from collections import defaultdict



n = int(eval(input()))



s_dict = defaultdict(int)

for _ in range(n):

    s = eval(input())

    s_dict[s] += 1



count_max = max(s_dict.values())

s_list = sorted([s for s, count in list(s_dict.items()) if count == count_max])

print(("\n".join(s_list)))
from collections import defaultdict

n = int(eval(input()))
s_dict = defaultdict(int)
for _ in range(n):
    s = eval(input())
    s_dict[s] += 1
count_max = max(s_dict.values())
s_list = sorted([s for s, count in list(s_dict.items()) if count == count_max])
for s in s_list:
    print(s)

from collections import defaultdict

n = int(eval(input()))
s_dict = defaultdict(int)
for _ in range(n):
    s = eval(input())
    s_dict[s] += 1
count_max = max(s_dict.values())
s_list = sorted([s for s, count in list(s_dict.items()) if count == count_max])
print(("\n".join(s_list)))

-for s in s_list: -    print(s) +print(("\n".join(s_list)))