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

from collections import Counter
results = Counter(s)

max_num = results.most_common()[0][1]
max_key_list = [kv[0] for kv in results.items() if kv[1] == max_num]
for i in sorted(max_key_list):
  print(i) n=int(input()) n int(input()) int input() input str(input()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) str(input()) str input() input s=[str(input()) for _ in range(n)] s [str(input()) for _ in range(n)] from collections import Counter results = Counter(s) results Counter(s) Counter s max_num = results.most_common()[0][1] max_num results.most_common()[0][1] [0] results.most_common() results.most_common results most_common 0 1 kv[0] for kv in results.items() if kv[1] == max_num for kv in results.items() if kv[1] == max_num kv results.items() results.items results items kv[1] == max_num kv[1] kv 1 max_num if kv[1] == max_num kv[0] kv 0 max_key_list = [kv[0] for kv in results.items() if kv[1] == max_num] max_key_list [kv[0] for kv in results.items() if kv[1] == max_num] for i in sorted(max_key_list):
  print(i) i sorted(max_key_list) sorted max_key_list print(i) print i results = Counter(s) Counter(s) results max_key_list = [kv[0] for kv in results.items() if kv[1] == max_num] [kv[0] for kv in results.items() if kv[1] == max_num] max_key_list s=[str(input()) for _ in range(n)] [str(input()) for _ in range(n)] s n=int(input()) int(input()) n max_num = results.most_common()[0][1] results.most_common()[0][1] max_num
n=int(input())
s=[str(input()) for _ in range(n)]

from collections import Counter
results = Counter(s)

max_num = results.most_common()[0][1]
max_key_list = [kv[0] for kv in results.items() if kv[1] == max_num]
for i in sorted(max_key_list):
  print(i)
