n = int(eval(input()))

L = sorted(eval(input()) for _ in range(n))

s = sorted(set(L))

c = [0] * len(s)

prev = L[0]

cnt = 1

l = 0

for i in range(1, len(L)):

    if L[i] == prev:

        cnt += 1

    else:

        c[l] = cnt

        l += 1

        cnt = 1

        prev = L[i]

c[-1] = cnt

m = max(c)

for j in range(len(c)):

    if c[j] == m:

        print((s[j]))

n = int(eval(input()))

d = {}

for _ in range(n):

    s = str(eval(input()))

    d[s] = 1 if s not in d else d[s] + 1

M = max(d.values())

L = []

for k, v in list(d.items()):

    if v == M:

        L.append(k)

L.sort()

for x in L:

    print(x)



n = int(eval(input()))
L = sorted(eval(input()) for _ in range(n))
s = sorted(set(L))
c = [0] * len(s)
prev = L[0]
cnt = 1
l = 0
for i in range(1, len(L)):
    if L[i] == prev:
        cnt += 1
    else:
        c[l] = cnt
        l += 1
        cnt = 1
        prev = L[i]
c[-1] = cnt
m = max(c)
for j in range(len(c)):
    if c[j] == m:
        print((s[j]))

n = int(eval(input()))
d = {}
for _ in range(n):
    s = str(eval(input()))
    d[s] = 1 if s not in d else d[s] + 1
M = max(d.values())
L = []
for k, v in list(d.items()):
    if v == M:
        L.append(k)
L.sort()
for x in L:
    print(x)

-L = sorted(eval(input()) for _ in range(n)) -s = sorted(set(L)) -c = [0] * len(s) -prev = L[0] -cnt = 1 -l = 0 -for i in range(1, len(L)): -    if L[i] == prev: -        cnt += 1 -    else: -        c[l] = cnt -        l += 1 -        cnt = 1 -        prev = L[i] -c[-1] = cnt -m = max(c) -for j in range(len(c)): -    if c[j] == m: -        print((s[j])) +d = {} +for _ in range(n): +    s = str(eval(input())) +    d[s] = 1 if s not in d else d[s] + 1 +M = max(d.values()) +L = [] +for k, v in list(d.items()): +    if v == M: +        L.append(k) +L.sort() +for x in L: +    print(x)