# 0028

array = []

while True:

    try:

        a = input()

        array.append(int(a))

    except EOFError:

        break

s = set(array)

count= list(map(lambda a: array.count(a), s))

mx = max(count)

modes = list(list(s)[i] for i, x in enumerate(count) if x == mx)

print(*modes, sep = '\n')

# 0028

array = []

while True:

    try:

        a = eval(input())

        array.append(int(a))

    except EOFError:

        break

s = set(array)

mx = array.count(max(array, key = array.count))

for a in sorted(s):

    if array.count(a) == mx:

        print(a)
# 0028
array = []
while True:
    try:
        a = input()
        array.append(int(a))
    except EOFError:
        break
s = set(array)
count = list(map(lambda a: array.count(a), s))
mx = max(count)
modes = list(list(s)[i] for i, x in enumerate(count) if x == mx)
print(*modes, sep="\n")

# 0028
array = []
while True:
    try:
        a = eval(input())
        array.append(int(a))
    except EOFError:
        break
s = set(array)
mx = array.count(max(array, key=array.count))
for a in sorted(s):
    if array.count(a) == mx:
        print(a)

-        a = input() +        a = eval(input()) -count = list(map(lambda a: array.count(a), s)) -mx = max(count) -modes = list(list(s)[i] for i, x in enumerate(count) if x == mx) -print(*modes, sep="\n") +mx = array.count(max(array, key=array.count)) +for a in sorted(s): +    if array.count(a) == mx: +        print(a)