from collections import defaultdict
dic = defaultdict(int)
N = int(input())

for i in range(N):
  temp = str(input())
  dic[temp] += 1

MAX = max(dic.values())
ans = []
for x in dic.keys():
  if dic[x] == MAX:
    ans.append(x)
ans.sort()
print(*ans,sep="\n") from collections import defaultdict dic = defaultdict(int) dic defaultdict(int) defaultdict int N = int(input()) N int(input()) int input() input for i in range(N):
  temp = str(input())
  dic[temp] += 1 i range(N) range N temp = str(input()) temp str(input()) str input() input dic[temp] += 1 dic[temp] dic temp 1 MAX = max(dic.values()) MAX max(dic.values()) max dic.values() dic.values dic values ans = [] ans [] for x in dic.keys():
  if dic[x] == MAX:
    ans.append(x) x dic.keys() dic.keys dic keys if dic[x] == MAX:
    ans.append(x) dic[x] == MAX dic[x] dic x MAX ans.append(x) ans.append ans append x ans.sort() ans.sort ans sort print(*ans,sep="\n") print *ans ans sep="\n" sep "\n" ans = [] [] ans dic = defaultdict(int) defaultdict(int) dic temp = str(input()) str(input()) temp N = int(input()) int(input()) N MAX = max(dic.values()) max(dic.values()) MAX
from collections import defaultdict
dic = defaultdict(int)
N = int(input())

for i in range(N):
  temp = str(input())
  dic[temp] += 1

MAX = max(dic.values())
ans = []
for x in dic.keys():
  if dic[x] == MAX:
    ans.append(x)
ans.sort()
print(*ans,sep="\n")