n = int(input())

words = {}
for i in range(n):
  word = input()
  if word in words:
    words[word] += 1
  else :
    words[word] = 1
words_sorted = sorted(words.items(), key=lambda x:x[1], reverse=True)    
score = words_sorted[0][1]
answers = []
for word in words_sorted:
  if score == word[1]:
    answers.append(word[0])
  else :
    break
    
for answer in sorted(answers) :
  print(answer) n = int(input()) n int(input()) int input() input words = {} words {} for i in range(n):
  word = input()
  if word in words:
    words[word] += 1
  else :
    words[word] = 1 i range(n) range n word = input() word input() input if word in words:
    words[word] += 1
  else :
    words[word] = 1 word in words word words words[word] += 1 words[word] words word 1 words[word] = 1 words[word] words word 1 words_sorted = sorted(words.items(), key=lambda x:x[1], reverse=True) words_sorted sorted(words.items(), key=lambda x:x[1], reverse=True) sorted words.items() words.items words items key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x reverse=True reverse True score = words_sorted[0][1] score words_sorted[0][1] [0] words_sorted 0 1 answers = [] answers [] for word in words_sorted:
  if score == word[1]:
    answers.append(word[0])
  else :
    break
     word words_sorted if score == word[1]:
    answers.append(word[0])
  else :
    break
     score == word[1] score word[1] word 1 answers.append(word[0]) answers.append answers append word[0] word 0 break for answer in sorted(answers) :
  print(answer) answer sorted(answers) sorted answers print(answer) print answer words = {} {} words answers = [] [] answers score = words_sorted[0][1] words_sorted[0][1] score word = input() input() word n = int(input()) int(input()) n words_sorted = sorted(words.items(), key=lambda x:x[1], reverse=True) sorted(words.items(), key=lambda x:x[1], reverse=True) words_sorted
n = int(input())

words = {}
for i in range(n):
  word = input()
  if word in words:
    words[word] += 1
  else :
    words[word] = 1
words_sorted = sorted(words.items(), key=lambda x:x[1], reverse=True)    
score = words_sorted[0][1]
answers = []
for word in words_sorted:
  if score == word[1]:
    answers.append(word[0])
  else :
    break
    
for answer in sorted(answers) :
  print(answer)