import collections
N=int(input())
s=[str(input()) for i in range(N)]
c=collections.Counter(s)
maximum =max(c.values()) 
max_c_list = sorted(key for key,value in c.items() if value == maximum)
for s in max_c_list:
  print(s) import collections collections N=int(input()) N int(input()) int input() input str(input()) for i in range(N) for i in range(N) i range(N) range N for i in range(N) str(input()) str input() input s=[str(input()) for i in range(N)] s [str(input()) for i in range(N)] c=collections.Counter(s) c collections.Counter(s) collections.Counter collections Counter s maximum =max(c.values()) maximum max(c.values()) max c.values() c.values c values max_c_list = sorted(key for key,value in c.items() if value == maximum) max_c_list sorted(key for key,value in c.items() if value == maximum) sorted key for s in max_c_list:
  print(s) s max_c_list print(s) print s s=[str(input()) for i in range(N)] [str(input()) for i in range(N)] s c=collections.Counter(s) collections.Counter(s) c max_c_list = sorted(key for key,value in c.items() if value == maximum) sorted(key for key,value in c.items() if value == maximum) max_c_list N=int(input()) int(input()) N maximum =max(c.values()) max(c.values()) maximum
import collections
N=int(input())
s=[str(input()) for i in range(N)]
c=collections.Counter(s)
maximum =max(c.values()) 
max_c_list = sorted(key for key,value in c.items() if value == maximum)
for s in max_c_list:
  print(s)