Row = int(input())
dictA= {}
a = ""
mid = 0
for i in range (Row):
  a = input()
  dictA.setdefault(a,0) 
  dictA[a] += 1
  mid = max(mid, dictA[a])
sDict = sorted(dictA.items())
for i in range(len(dictA)):
  if sDict[i][1]== mid:
    print(sDict[i][0]) Row = int(input()) Row int(input()) int input() input dictA= {} dictA {} a = "" a "" mid = 0 mid 0 for i in range (Row):
  a = input()
  dictA.setdefault(a,0) 
  dictA[a] += 1
  mid = max(mid, dictA[a]) i range (Row) range Row a = input() a input() input dictA.setdefault(a,0) dictA.setdefault dictA setdefault a 0 dictA[a] += 1 dictA[a] dictA a 1 mid = max(mid, dictA[a]) mid max(mid, dictA[a]) max mid dictA[a] dictA a sDict = sorted(dictA.items()) sDict sorted(dictA.items()) sorted dictA.items() dictA.items dictA items for i in range(len(dictA)):
  if sDict[i][1]== mid:
    print(sDict[i][0]) i range(len(dictA)) range len(dictA) len dictA if sDict[i][1]== mid:
    print(sDict[i][0]) sDict[i][1]== mid sDict[i][1] [i] sDict i 1 mid print(sDict[i][0]) print sDict[i][0] [i] sDict i 0 dictA= {} {} dictA a = "" "" a a = input() input() a mid = 0 0 mid mid = max(mid, dictA[a]) max(mid, dictA[a]) mid sDict = sorted(dictA.items()) sorted(dictA.items()) sDict Row = int(input()) int(input()) Row
Row = int(input())
dictA= {}
a = ""
mid = 0
for i in range (Row):
  a = input()
  dictA.setdefault(a,0) 
  dictA[a] += 1
  mid = max(mid, dictA[a])
sDict = sorted(dictA.items())
for i in range(len(dictA)):
  if sDict[i][1]== mid:
    print(sDict[i][0])