import collections

n = int(eval(input()))

s = collections.Counter([eval(input()) for i in range(n)])



values, counts = list(zip(*s.most_common()))



len = counts.count(max(counts))

values = sorted(values[:len])



for i in range(len):

    print((values[i]))

n = int(eval(input()))

s = sorted([eval(input()) for i in range(n)])

c = [1]*n



for i in range(n-1):

    if s[i] == s[i+1]:

        c[i+1] += c[i]

m = max(c)



for i in range(n):

    if c[i] == m:

        print((s[i]))

import collections

n = int(eval(input()))
s = collections.Counter([eval(input()) for i in range(n)])
values, counts = list(zip(*s.most_common()))
len = counts.count(max(counts))
values = sorted(values[:len])
for i in range(len):
    print((values[i]))

n = int(eval(input()))
s = sorted([eval(input()) for i in range(n)])
c = [1] * n
for i in range(n - 1):
    if s[i] == s[i + 1]:
        c[i + 1] += c[i]
m = max(c)
for i in range(n):
    if c[i] == m:
        print((s[i]))

-import collections - -s = collections.Counter([eval(input()) for i in range(n)]) -values, counts = list(zip(*s.most_common())) -len = counts.count(max(counts)) -values = sorted(values[:len]) -for i in range(len): -    print((values[i])) +s = sorted([eval(input()) for i in range(n)]) +c = [1] * n +for i in range(n - 1): +    if s[i] == s[i + 1]: +        c[i + 1] += c[i] +m = max(c) +for i in range(n): +    if c[i] == m: +        print((s[i]))