from collections import Counter

N = int(eval(input()))

Sc = Counter([eval(input()) for _ in range(N)]).most_common()

# print(Sc)

max_num = Sc[0][1]

ans = []

for key, val in Sc:

    if val == max_num:

        ans.append(key)

ans.sort()

for t in ans:

    print(t)
N = int(input())

from collections import Counter

Sc = Counter([input() for _ in range(N)])

max_count = max(Sc.values())

ans = sorted([k for k, v in Sc.items() if v == max_count])

print(*ans, sep="\n")

from collections import Counter

N = int(eval(input()))
Sc = Counter([eval(input()) for _ in range(N)]).most_common()
# print(Sc)
max_num = Sc[0][1]
ans = []
for key, val in Sc:
    if val == max_num:
        ans.append(key)
ans.sort()
for t in ans:
    print(t)

N = int(input())
from collections import Counter

Sc = Counter([input() for _ in range(N)])
max_count = max(Sc.values())
ans = sorted([k for k, v in Sc.items() if v == max_count])
print(*ans, sep="\n")

+N = int(input()) -N = int(eval(input())) -Sc = Counter([eval(input()) for _ in range(N)]).most_common() -# print(Sc) -max_num = Sc[0][1] -ans = [] -for key, val in Sc: -    if val == max_num: -        ans.append(key) -ans.sort() -for t in ans: -    print(t) +Sc = Counter([input() for _ in range(N)]) +max_count = max(Sc.values()) +ans = sorted([k for k, v in Sc.items() if v == max_count]) +print(*ans, sep="\n")