import collections



n = int(eval(input()))

s = list(eval(input()) for i in range(n))

s = sorted(s)

c = collections.Counter(s)

p = max(c.values())

s = sorted(list(set(s)))



for i in range(len(s)):

    if c[s[i]] == p:

        print((s[i]))
import collections



n = int(eval(input()))

s = list(eval(input()) for i in range(n))

c = collections.Counter(s)

p = max(c.values())

s = sorted(list(set(s)))



for i in range(len(s)):

    if c[s[i]] == p:

        print((s[i]))
import collections

n = int(eval(input()))
s = list(eval(input()) for i in range(n))
s = sorted(s)
c = collections.Counter(s)
p = max(c.values())
s = sorted(list(set(s)))
for i in range(len(s)):
    if c[s[i]] == p:
        print((s[i]))

import collections

n = int(eval(input()))
s = list(eval(input()) for i in range(n))
c = collections.Counter(s)
p = max(c.values())
s = sorted(list(set(s)))
for i in range(len(s)):
    if c[s[i]] == p:
        print((s[i]))

-s = sorted(s)