from collections import Counter



N = int(eval(input()))

S = []

for i in range(N):

  S.append(eval(input()))

S.sort()

c = Counter(S).most_common()

m = c[0][1]

c.sort()

for i in range(len(c)):

    if c[i][1] == m:

      print((c[i][0]))
from collections import Counter



N = int(eval(input()))

S = []

for i in range(N):

    S.append(eval(input()))



count = Counter(S).most_common()

mode = count[0][1]

count.sort()

##print("--")

for i in range(len(count)):

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

        print((count[i][0]))

from collections import Counter

N = int(eval(input()))
S = []
for i in range(N):
    S.append(eval(input()))
S.sort()
c = Counter(S).most_common()
m = c[0][1]
c.sort()
for i in range(len(c)):
    if c[i][1] == m:
        print((c[i][0]))

from collections import Counter

N = int(eval(input()))
S = []
for i in range(N):
    S.append(eval(input()))
count = Counter(S).most_common()
mode = count[0][1]
count.sort()
##print("--")
for i in range(len(count)):
    if count[i][1] == mode:
        print((count[i][0]))

-S.sort() -c = Counter(S).most_common() -m = c[0][1] -c.sort() -for i in range(len(c)): -    if c[i][1] == m: -        print((c[i][0])) +count = Counter(S).most_common() +mode = count[0][1] +count.sort() +##print("--") +for i in range(len(count)): +    if count[i][1] == mode: +        print((count[i][0]))