N = int(input())
 
dict = {}
strings = []
for i in range(N):
    x = input()
    if x in dict.keys():
        dict[x] += 1
    else:
        dict[x] = 1
 
maximum = 1
for i in dict:
    maximum = max(maximum,dict[i])
 
for word in dict:
    if dict[word] == maximum:
        strings.append(word)
strings.sort()
for word in strings:
    print(word) N = int(input()) N int(input()) int input() input dict = {} dict {} strings = [] strings [] for i in range(N):
    x = input()
    if x in dict.keys():
        dict[x] += 1
    else:
        dict[x] = 1
  i range(N) range N x = input() x input() input if x in dict.keys():
        dict[x] += 1
    else:
        dict[x] = 1
  x in dict.keys() x dict.keys() dict.keys dict keys dict[x] += 1 dict[x] dict x 1 dict[x] = 1 dict[x] dict x 1 maximum = 1 maximum 1 for i in dict:
    maximum = max(maximum,dict[i])
  i dict maximum = max(maximum,dict[i]) maximum max(maximum,dict[i]) max maximum dict[i] dict i for word in dict:
    if dict[word] == maximum:
        strings.append(word) word dict if dict[word] == maximum:
        strings.append(word) dict[word] == maximum dict[word] dict word maximum strings.append(word) strings.append strings append word strings.sort() strings.sort strings sort for word in strings:
    print(word) word strings print(word) print word strings = [] [] strings maximum = 1 1 maximum dict = {} {} dict maximum = max(maximum,dict[i]) max(maximum,dict[i]) maximum N = int(input()) int(input()) N x = input() input() x
N = int(input())
 
dict = {}
strings = []
for i in range(N):
    x = input()
    if x in dict.keys():
        dict[x] += 1
    else:
        dict[x] = 1
 
maximum = 1
for i in dict:
    maximum = max(maximum,dict[i])
 
for word in dict:
    if dict[word] == maximum:
        strings.append(word)
strings.sort()
for word in strings:
    print(word)