import collections

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

m = max(s.values())



a = []

for d in list(s.items()):

  if d[1] == m:

    a.append(d[0])

for s in sorted(a):

  print(s)
import collections

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

m = max(s.values())

 

a = []

for d in list(s.items()):

  if d[1] == m:

    a.append(d[0])

print(("\n".join(sorted(a))))
import collections

s = collections.Counter([eval(input()) for s in range(int(eval(input())))])
m = max(s.values())
a = []
for d in list(s.items()):
    if d[1] == m:
        a.append(d[0])
for s in sorted(a):
    print(s)

import collections

s = collections.Counter([eval(input()) for s in range(int(eval(input())))])
m = max(s.values())
a = []
for d in list(s.items()):
    if d[1] == m:
        a.append(d[0])
print(("\n".join(sorted(a))))

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