import sys

import collections





l = []

for line in sys.stdin:

    l.append(int(line))

counted = collections.Counter(l).most_common()

maxv = counted[0][1]

for k, v in counted:

    if v == maxv:

        print(k)

    else:

        break
import sys

import collections





l = []

for line in sys.stdin:

    l.append(int(line))

counted = collections.Counter(l).most_common()

maxv = counted[0][1]

for k, v in counted:

    if v == maxv:

        print(k)
import sys
import collections

l = []
for line in sys.stdin:
    l.append(int(line))
counted = collections.Counter(l).most_common()
maxv = counted[0][1]
for k, v in counted:
    if v == maxv:
        print(k)
    else:
        break

import sys
import collections

l = []
for line in sys.stdin:
    l.append(int(line))
counted = collections.Counter(l).most_common()
maxv = counted[0][1]
for k, v in counted:
    if v == maxv:
        print(k)

-    else: -        break