from collections import Counter

N = int(input())
S = [input() for _ in range(N)]

counter = Counter(S)
maxv = max(counter.values())
ans = []
for k, v in counter.items():
    if v == maxv:
        ans.append(k)

ans.sort()

for s in ans:
    print(s) 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)] counter = Counter(S) counter Counter(S) Counter S maxv = max(counter.values()) maxv max(counter.values()) max counter.values() counter.values counter values ans = [] ans [] for k, v in counter.items():
    if v == maxv:
        ans.append(k) k v counter.items() counter.items counter items if v == maxv:
        ans.append(k) v == maxv v maxv ans.append(k) ans.append ans append k ans.sort() ans.sort ans sort for s in ans:
    print(s) s ans print(s) print s S = [input() for _ in range(N)] [input() for _ in range(N)] S N = int(input()) int(input()) N ans = [] [] ans counter = Counter(S) Counter(S) counter maxv = max(counter.values()) max(counter.values()) maxv
from collections import Counter

N = int(input())
S = [input() for _ in range(N)]

counter = Counter(S)
maxv = max(counter.values())
ans = []
for k, v in counter.items():
    if v == maxv:
        ans.append(k)

ans.sort()

for s in ans:
    print(s)
