n = int(input())
s = {}
maxvalue = -1
for i in range(n):
    sn = input()
    if(s.get(sn) == None):
        s[sn] = 0
    else:
        s[sn] += 1
    maxvalue = max(maxvalue,s[sn])

answers = []
for key in s.keys():
    if s[key] == maxvalue:
        answers.append(key)

answers.sort()

for ans in answers:
    print(ans) n = int(input()) n int(input()) int input() input s = {} s {} maxvalue = -1 maxvalue -1 for i in range(n):
    sn = input()
    if(s.get(sn) == None):
        s[sn] = 0
    else:
        s[sn] += 1
    maxvalue = max(maxvalue,s[sn]) i range(n) range n sn = input() sn input() input if(s.get(sn) == None):
        s[sn] = 0
    else:
        s[sn] += 1
     s.get(sn) == None s.get(sn) s.get s get sn None s[sn] = 0 s[sn] s sn 0 s[sn] += 1 s[sn] s sn 1 maxvalue = max(maxvalue,s[sn]) maxvalue max(maxvalue,s[sn]) max maxvalue s[sn] s sn answers = [] answers [] for key in s.keys():
    if s[key] == maxvalue:
        answers.append(key) key s.keys() s.keys s keys if s[key] == maxvalue:
        answers.append(key) s[key] == maxvalue s[key] s key maxvalue answers.append(key) answers.append answers append key answers.sort() answers.sort answers sort for ans in answers:
    print(ans) ans answers print(ans) print ans n = int(input()) int(input()) n sn = input() input() sn answers = [] [] answers s = {} {} s maxvalue = max(maxvalue,s[sn]) max(maxvalue,s[sn]) maxvalue maxvalue = -1 -1 maxvalue
n = int(input())
s = {}
maxvalue = -1
for i in range(n):
    sn = input()
    if(s.get(sn) == None):
        s[sn] = 0
    else:
        s[sn] += 1
    maxvalue = max(maxvalue,s[sn])

answers = []
for key in s.keys():
    if s[key] == maxvalue:
        answers.append(key)

answers.sort()

for ans in answers:
    print(ans)