from collections import Counter



N = int(eval(input()))

S = []

for _ in range(N):

    S.append(eval(input()))

counter = Counter(S)

sorted_S = list(sorted(set(S)))

maxcnt = max(counter.values())

for Si in sorted_S:

    if counter[Si] == maxcnt:

        print(Si)

 
from collections import Counter



N = int(eval(input()))

S = []

for _ in range(N):

    S.append(eval(input()))

counter = Counter(S)

sorted_S = list(sorted(counter.keys()))

maxcnt = max(counter.values())

for Si in sorted_S:

    if counter[Si] == maxcnt:

        print(Si)

from collections import Counter

N = int(eval(input()))
S = []
for _ in range(N):
    S.append(eval(input()))
counter = Counter(S)
sorted_S = list(sorted(set(S)))
maxcnt = max(counter.values())
for Si in sorted_S:
    if counter[Si] == maxcnt:
        print(Si)

from collections import Counter

N = int(eval(input()))
S = []
for _ in range(N):
    S.append(eval(input()))
counter = Counter(S)
sorted_S = list(sorted(counter.keys()))
maxcnt = max(counter.values())
for Si in sorted_S:
    if counter[Si] == maxcnt:
        print(Si)

-sorted_S = list(sorted(set(S))) +sorted_S = list(sorted(counter.keys()))