from collections import Counter
n=int(input())
s=Counter([input()for _ in[0]*n])
m=s.most_common(1)[0][1]
r=sorted((k for k,v in s.items() if v==m))
for a in r:print(a) from collections import Counter n=int(input()) n int(input()) int input() input input()for _ in[0]*n for _ in[0]*n _ [0]*n [0] 0 n for _ in[0]*n input() input s=Counter([input()for _ in[0]*n]) s Counter([input()for _ in[0]*n]) Counter [input()for _ in[0]*n] m=s.most_common(1)[0][1] m s.most_common(1)[0][1] [0] s.most_common(1) s.most_common s most_common 1 0 1 k for k,v in s.items() if v==m for k,v in s.items() if v==m k v s.items() s.items s items v==m v m if v==m k r=sorted((k for k,v in s.items() if v==m)) r sorted((k for k,v in s.items() if v==m)) sorted (k for k,v in s.items() if v==m) for a in r:print(a) a r m=s.most_common(1)[0][1] s.most_common(1)[0][1] m n=int(input()) int(input()) n r=sorted((k for k,v in s.items() if v==m)) sorted((k for k,v in s.items() if v==m)) r s=Counter([input()for _ in[0]*n]) Counter([input()for _ in[0]*n]) s
from collections import Counter
n=int(input())
s=Counter([input()for _ in[0]*n])
m=s.most_common(1)[0][1]
r=sorted((k for k,v in s.items() if v==m))
for a in r:print(a)