N=int(input())
S=[]
for _ in range(N):
    _=input()
    S.append(_)
import collections
a=collections.Counter(S)
b=max(a.values())
new_a=[k for k, v in a.items() if v==b]
new_a.sort()
for i in range(len(new_a)):
    print(new_a[i])

 N=int(input()) N int(input()) int input() input S=[] S [] for _ in range(N):
    _=input()
    S.append(_) _ range(N) range N _=input() _ input() input S.append(_) S.append S append _ import collections collections a=collections.Counter(S) a collections.Counter(S) collections.Counter collections Counter S b=max(a.values()) b max(a.values()) max a.values() a.values a values k for k, v in a.items() if v==b for k, v in a.items() if v==b k v a.items() a.items a items v==b v b if v==b k new_a=[k for k, v in a.items() if v==b] new_a [k for k, v in a.items() if v==b] new_a.sort() new_a.sort new_a sort for i in range(len(new_a)):
    print(new_a[i]) i range(len(new_a)) range len(new_a) len new_a print(new_a[i]) print new_a[i] new_a i N=int(input()) int(input()) N b=max(a.values()) max(a.values()) b a=collections.Counter(S) collections.Counter(S) a new_a=[k for k, v in a.items() if v==b] [k for k, v in a.items() if v==b] new_a S=[] [] S _=input() input() _
N=int(input())
S=[]
for _ in range(N):
    _=input()
    S.append(_)
import collections
a=collections.Counter(S)
b=max(a.values())
new_a=[k for k, v in a.items() if v==b]
new_a.sort()
for i in range(len(new_a)):
    print(new_a[i])


