n=int(eval(input()))



sl=[]

for i in range(n):

    s=eval(input())

    sl.append(s)

    

import collections



c=collections.Counter(sl)

# print(c)

d=(c.most_common())



e=[d[0][0]]

tmp=d[0][1]

for i,j in d:

    if tmp==j:

        e.append(i)

    else:

        break

e=list(set(e))

e.sort()

for i in e:

    print(i)

n,*s=list(map(str,open(0).read().split()))

from collections import*

c=Counter(s).most_common()

maxm=c[0][1]

ans=[]

for i,j in c:

  if maxm==j:

    ans+=i,

for b in sorted(ans):

  print(b)

n = int(eval(input()))
sl = []
for i in range(n):
    s = eval(input())
    sl.append(s)
import collections

c = collections.Counter(sl)
# print(c)
d = c.most_common()
e = [d[0][0]]
tmp = d[0][1]
for i, j in d:
    if tmp == j:
        e.append(i)
    else:
        break
e = list(set(e))
e.sort()
for i in e:
    print(i)

n, *s = list(map(str, open(0).read().split()))
from collections import *

c = Counter(s).most_common()
maxm = c[0][1]
ans = []
for i, j in c:
    if maxm == j:
        ans += (i,)
for b in sorted(ans):
    print(b)

-n = int(eval(input())) -sl = [] -for i in range(n): -    s = eval(input()) -    sl.append(s) -import collections +n, *s = list(map(str, open(0).read().split())) +from collections import * -c = collections.Counter(sl) -# print(c) -d = c.most_common() -e = [d[0][0]] -tmp = d[0][1] -for i, j in d: -    if tmp == j: -        e.append(i) -    else: -        break -e = list(set(e)) -e.sort() -for i in e: -    print(i) +c = Counter(s).most_common() +maxm = c[0][1] +ans = [] +for i, j in c: +    if maxm == j: +        ans += (i,) +for b in sorted(ans): +    print(b)