N = int(eval(input()))

input_line = [eval(input()) for _ in range(N)]

count = {}

for w in input_line:

    if w in count:

        count[w] += 1

    else:

        count[w] = 1

max_values = max(count.values())

keys = [k for k, v in list(count.items()) if v == max_values]

for w in sorted(keys):

    print(w)

N = int(eval(input()))

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

count = {}

for w in [eval(input()) for _ in range(N)]:

    if w in count:

        count[w] += 1

    else:

        count[w] = 1

max_values = max(count.values())

keys = [k for k, v in list(count.items()) if v == max_values]

for w in sorted(keys):

    print(w)

N = int(eval(input()))
input_line = [eval(input()) for _ in range(N)]
count = {}
for w in input_line:
    if w in count:
        count[w] += 1
    else:
        count[w] = 1
max_values = max(count.values())
keys = [k for k, v in list(count.items()) if v == max_values]
for w in sorted(keys):
    print(w)

N = int(eval(input()))
# input_line = [input() for _ in range(N)]
count = {}
for w in [eval(input()) for _ in range(N)]:
    if w in count:
        count[w] += 1
    else:
        count[w] = 1
max_values = max(count.values())
keys = [k for k, v in list(count.items()) if v == max_values]
for w in sorted(keys):
    print(w)

-input_line = [eval(input()) for _ in range(N)] +# input_line = [input() for _ in range(N)] -for w in input_line: +for w in [eval(input()) for _ in range(N)]: