from collections import Counter

N = int(input())
S = [input() for _ in range(N)]
cnt = Counter(S)
M = max(list(cnt.values()))
ans = []

for k, v in cnt.items():
    if v==M:
        ans.append(k)

ans.sort()

for ans_i in ans:
    print(ans_i) from collections import Counter N = int(input()) N int(input()) int input() input input() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) input() input S = [input() for _ in range(N)] S [input() for _ in range(N)] cnt = Counter(S) cnt Counter(S) Counter S M = max(list(cnt.values())) M max(list(cnt.values())) max list(cnt.values()) list cnt.values() cnt.values cnt values ans = [] ans [] for k, v in cnt.items():
    if v==M:
        ans.append(k) k v cnt.items() cnt.items cnt items if v==M:
        ans.append(k) v==M v M ans.append(k) ans.append ans append k ans.sort() ans.sort ans sort for ans_i in ans:
    print(ans_i) ans_i ans print(ans_i) print ans_i S = [input() for _ in range(N)] [input() for _ in range(N)] S M = max(list(cnt.values())) max(list(cnt.values())) M ans = [] [] ans N = int(input()) int(input()) N cnt = Counter(S) Counter(S) cnt
from collections import Counter

N = int(input())
S = [input() for _ in range(N)]
cnt = Counter(S)
M = max(list(cnt.values()))
ans = []

for k, v in cnt.items():
    if v==M:
        ans.append(k)

ans.sort()

for ans_i in ans:
    print(ans_i)