N=int(input())
S={}
for n in range(N):
  s=input()
  S[s]=S.get(s,0)+1

maxS=max(S.values())
S=[k for k,v in S.items() if v==maxS]
print('\n'.join(sorted(S))) N=int(input()) N int(input()) int input() input S={} S {} for n in range(N):
  s=input()
  S[s]=S.get(s,0)+1 n range(N) range N s=input() s input() input S[s]=S.get(s,0)+1 S[s] S s S.get(s,0)+1 S.get(s,0) S.get S get s 0 1 maxS=max(S.values()) maxS max(S.values()) max S.values() S.values S values k for k,v in S.items() if v==maxS for k,v in S.items() if v==maxS k v S.items() S.items S items v==maxS v maxS if v==maxS k S=[k for k,v in S.items() if v==maxS] S [k for k,v in S.items() if v==maxS] print('\n'.join(sorted(S))) print '\n'.join(sorted(S)) '\n'.join '\n' join sorted(S) sorted S N=int(input()) int(input()) N s=input() input() s maxS=max(S.values()) max(S.values()) maxS S={} {} S S=[k for k,v in S.items() if v==maxS] [k for k,v in S.items() if v==maxS] S
N=int(input())
S={}
for n in range(N):
  s=input()
  S[s]=S.get(s,0)+1

maxS=max(S.values())
S=[k for k,v in S.items() if v==maxS]
print('\n'.join(sorted(S)))
