import collections
n = int(input())
s = [input() for _ in range(n)]

c = collections.Counter(s)
max_cnt = max(c.values())

ans = [k for k, v in c.items() if v == max_cnt]
ans.sort()
for i in ans:
    print(i) import collections collections 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)] c = collections.Counter(s) c collections.Counter(s) collections.Counter collections Counter s max_cnt = max(c.values()) max_cnt max(c.values()) max c.values() c.values c values k for k, v in c.items() if v == max_cnt for k, v in c.items() if v == max_cnt k v c.items() c.items c items v == max_cnt v max_cnt if v == max_cnt k ans = [k for k, v in c.items() if v == max_cnt] ans [k for k, v in c.items() if v == max_cnt] ans.sort() ans.sort ans sort for i in ans:
    print(i) i ans print(i) print i s = [input() for _ in range(n)] [input() for _ in range(n)] s n = int(input()) int(input()) n ans = [k for k, v in c.items() if v == max_cnt] [k for k, v in c.items() if v == max_cnt] ans c = collections.Counter(s) collections.Counter(s) c max_cnt = max(c.values()) max(c.values()) max_cnt
import collections
n = int(input())
s = [input() for _ in range(n)]

c = collections.Counter(s)
max_cnt = max(c.values())

ans = [k for k, v in c.items() if v == max_cnt]
ans.sort()
for i in ans:
    print(i)