import collections

N = int(eval(input()))

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

 

counter = collections.Counter(s)

count = counter.most_common()

 

most = count[0][1]

 

c =[]

for i in range(len(count)):

    if count[i][1] == most:

        c.append(count[i][0])

 

c.sort()

 

for i in range(len(c)):

    print((c[i]))
import collections

N = int(eval(input()))

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

 

counter = collections.Counter(s)

count = counter.most_common()

 

most = count[0][1]

 

c =[]

for i in range(len(counter)):

    if count[i][1] == most:

        c.append(count[i][0])

 

c.sort()

 

for i in range(len(c)):

    print((c[i]))
import collections

N = int(eval(input()))
s = [eval(input()) for i in range(N)]
counter = collections.Counter(s)
count = counter.most_common()
most = count[0][1]
c = []
for i in range(len(count)):
    if count[i][1] == most:
        c.append(count[i][0])
c.sort()
for i in range(len(c)):
    print((c[i]))

import collections

N = int(eval(input()))
s = [eval(input()) for i in range(N)]
counter = collections.Counter(s)
count = counter.most_common()
most = count[0][1]
c = []
for i in range(len(counter)):
    if count[i][1] == most:
        c.append(count[i][0])
c.sort()
for i in range(len(c)):
    print((c[i]))

-for i in range(len(count)): +for i in range(len(counter)):