N = int(input())
words = {}
for _ in range(N):
  word = input()
  if word in words:
    words[word] += 1
  else:
    words[word] = 1
sorted_words = sorted(words.items(), key=lambda x: (-x[1], x[0]))
max_v = sorted_words[0][1]
for k, v in sorted_words:
  if v == max_v:
    print(k)
  else:
    exit()
   N = int(input()) N int(input()) int input() input words = {} words {} for _ in range(N):
  word = input()
  if word in words:
    words[word] += 1
  else:
    words[word] = 1 _ 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 sorted_words = sorted(words.items(), key=lambda x: (-x[1], x[0])) sorted_words sorted(words.items(), key=lambda x: (-x[1], x[0])) sorted words.items() words.items words items key=lambda x: (-x[1], x[0]) key lambda x: (-x[1], x[0]) (-x[1], x[0]) -x[1] x[1] x 1 x[0] x 0 x max_v = sorted_words[0][1] max_v sorted_words[0][1] [0] sorted_words 0 1 for k, v in sorted_words:
  if v == max_v:
    print(k)
  else:
    exit()
   k v sorted_words if v == max_v:
    print(k)
  else:
    exit()
   v == max_v v max_v print(k) print k exit() exit word = input() input() word N = int(input()) int(input()) N sorted_words = sorted(words.items(), key=lambda x: (-x[1], x[0])) sorted(words.items(), key=lambda x: (-x[1], x[0])) sorted_words words = {} {} words max_v = sorted_words[0][1] sorted_words[0][1] max_v
N = int(input())
words = {}
for _ in range(N):
  word = input()
  if word in words:
    words[word] += 1
  else:
    words[word] = 1
sorted_words = sorted(words.items(), key=lambda x: (-x[1], x[0]))
max_v = sorted_words[0][1]
for k, v in sorted_words:
  if v == max_v:
    print(k)
  else:
    exit()
  
