N = int(input())
count = {}
max_count = 0
for _ in range(N):
  s = input()
  if s not in count:
    count[s] = 0
  count[s] += 1
  max_count = max(max_count, count[s])

longest = []
for s, c in count.items():
  if c == max_count:
    longest.append(s)

longest.sort()
for s in longest:
  print(s) N = int(input()) N int(input()) int input() input count = {} count {} max_count = 0 max_count 0 for _ in range(N):
  s = input()
  if s not in count:
    count[s] = 0
  count[s] += 1
  max_count = max(max_count, count[s]) _ range(N) range N s = input() s input() input if s not in count:
    count[s] = 0
   s not in count s count count[s] = 0 count[s] count s 0 count[s] += 1 count[s] count s 1 max_count = max(max_count, count[s]) max_count max(max_count, count[s]) max max_count count[s] count s longest = [] longest [] for s, c in count.items():
  if c == max_count:
    longest.append(s) s c count.items() count.items count items if c == max_count:
    longest.append(s) c == max_count c max_count longest.append(s) longest.append longest append s longest.sort() longest.sort longest sort for s in longest:
  print(s) s longest print(s) print s count = {} {} count longest = [] [] longest s = input() input() s N = int(input()) int(input()) N max_count = max(max_count, count[s]) max(max_count, count[s]) max_count max_count = 0 0 max_count
N = int(input())
count = {}
max_count = 0
for _ in range(N):
  s = input()
  if s not in count:
    count[s] = 0
  count[s] += 1
  max_count = max(max_count, count[s])

longest = []
for s, c in count.items():
  if c == max_count:
    longest.append(s)

longest.sort()
for s in longest:
  print(s)