d={} ; a=[]

from collections import Counter

for _ in range(int(eval(input()))):

    s=eval(input())

    a.append(s)

d=Counter(a)

maxx=max(d.values())

ans=[]

for i in d:

    if d[i]==maxx:

        ans.append(i)

ans.sort()

for i in ans:

    print(i)

    
import sys

input = lambda: sys.stdin.readline().rstrip()

d={} ; a=[]

from collections import Counter

for _ in range(int(eval(input()))):

    s=eval(input())

    a.append(s)

d=Counter(a)

maxx=max(d.values())

ans=[]

for i in d:

    if d[i]==maxx:

        ans.append(i)

ans.sort()

for i in ans:

    print(i)

    
d = {}
a = []
from collections import Counter

for _ in range(int(eval(input()))):
    s = eval(input())
    a.append(s)
d = Counter(a)
maxx = max(d.values())
ans = []
for i in d:
    if d[i] == maxx:
        ans.append(i)
ans.sort()
for i in ans:
    print(i)

import sys

input = lambda: sys.stdin.readline().rstrip()
d = {}
a = []
from collections import Counter

for _ in range(int(eval(input()))):
    s = eval(input())
    a.append(s)
d = Counter(a)
maxx = max(d.values())
ans = []
for i in d:
    if d[i] == maxx:
        ans.append(i)
ans.sort()
for i in ans:
    print(i)

+import sys + +input = lambda: sys.stdin.readline().rstrip()