n=int(eval(input()))

dic={}



for i in range(n):

    s=eval(input())

    count=dic.get(s,0)

    count+=1

    dic[s]=count

mx=1

for v in list(dic.values()):

    mx=max(v,mx)

ans=[]

for k,v in list(dic.items()):

    if v==mx:

        ans.append(k)

ans.sort()

#print("---")

for st in ans:

    print(st)





n=int(eval(input()))

#n,m=map(int,input().split())

#hl=list(map(int,input().split()))

#l=[list(map(int,input().split())) for i in range(n)]



dic={}



for i in range(n):

    s=eval(input())

    dic[s]=dic.get(s,0)+1



mx=max(dic.values())

ansl=[]

for k, v in list(dic.items()):

    if v==mx:

        ansl.append(k)



ansl.sort()



for st in ansl:

    print(st)
n = int(eval(input()))
dic = {}
for i in range(n):
    s = eval(input())
    count = dic.get(s, 0)
    count += 1
    dic[s] = count
mx = 1
for v in list(dic.values()):
    mx = max(v, mx)
ans = []
for k, v in list(dic.items()):
    if v == mx:
        ans.append(k)
ans.sort()
# print("---")
for st in ans:
    print(st)

n = int(eval(input()))
# n,m=map(int,input().split())
# hl=list(map(int,input().split()))
# l=[list(map(int,input().split())) for i in range(n)]
dic = {}
for i in range(n):
    s = eval(input())
    dic[s] = dic.get(s, 0) + 1
mx = max(dic.values())
ansl = []
for k, v in list(dic.items()):
    if v == mx:
        ansl.append(k)
ansl.sort()
for st in ansl:
    print(st)

+# n,m=map(int,input().split()) +# hl=list(map(int,input().split())) +# l=[list(map(int,input().split())) for i in range(n)] -    count = dic.get(s, 0) -    count += 1 -    dic[s] = count -mx = 1 -for v in list(dic.values()): -    mx = max(v, mx) -ans = [] +    dic[s] = dic.get(s, 0) + 1 +mx = max(dic.values()) +ansl = [] -        ans.append(k) -ans.sort() -for st in ans: +        ansl.append(k) +ansl.sort() +for st in ansl: