n = int(eval(input()))

dics = {}

for i in range(n):

    try:

        s = eval(input())

        dics[s] += 1

    except KeyError:

        dics[s] = 1

max_v = max(dics.values())



max_k_list = [kv[0] for kv in list(dics.items()) if kv[1] == max_v]

max_k_list.sort()

for i in max_k_list:

    print(i)
from collections import defaultdict

n = int(input())

dics = defaultdict(int)

for i in range(n):

    s = input()

    dics[s] += 1

max_v = max(dics.values())

max_k_list = [kv[0] for kv in dics.items() if kv[1] == max_v]

max_k_list.sort()

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

n = int(eval(input()))
dics = {}
for i in range(n):
    try:
        s = eval(input())
        dics[s] += 1
    except KeyError:
        dics[s] = 1
max_v = max(dics.values())
max_k_list = [kv[0] for kv in list(dics.items()) if kv[1] == max_v]
max_k_list.sort()
for i in max_k_list:
    print(i)

from collections import defaultdict

n = int(input())
dics = defaultdict(int)
for i in range(n):
    s = input()
    dics[s] += 1
max_v = max(dics.values())
max_k_list = [kv[0] for kv in dics.items() if kv[1] == max_v]
max_k_list.sort()
print(*max_k_list, sep="\n")

-n = int(eval(input())) -dics = {} +from collections import defaultdict + +n = int(input()) +dics = defaultdict(int) -    try: -        s = eval(input()) -        dics[s] += 1 -    except KeyError: -        dics[s] = 1 +    s = input() +    dics[s] += 1 -max_k_list = [kv[0] for kv in list(dics.items()) if kv[1] == max_v] +max_k_list = [kv[0] for kv in dics.items() if kv[1] == max_v] -for i in max_k_list: -    print(i) +print(*max_k_list, sep="\n")