import collections

n = int(input())
words = []
for i in range(n):
    words.append(input())

c = collections.Counter(words)

values, counts = zip(*c.most_common())

nums = counts.count(max(counts))
xs = (list(values))[:nums]
xs.sort()

for x in xs:
    print(x) import collections collections n = int(input()) n int(input()) int input() input words = [] words [] for i in range(n):
    words.append(input()) i range(n) range n words.append(input()) words.append words append input() input c = collections.Counter(words) c collections.Counter(words) collections.Counter collections Counter words values, counts = zip(*c.most_common()) values zip(*c.most_common()) zip *c.most_common() c.most_common() c.most_common c most_common counts nums = counts.count(max(counts)) nums counts.count(max(counts)) counts.count counts count max(counts) max counts xs = (list(values))[:nums] xs (list(values))[:nums] list(values) list values :nums nums xs.sort() xs.sort xs sort for x in xs:
    print(x) x xs print(x) print x xs = (list(values))[:nums] (list(values))[:nums] xs words = [] [] words counts = zip(*c.most_common()) zip(*c.most_common()) counts nums = counts.count(max(counts)) counts.count(max(counts)) nums values, counts = zip(*c.most_common()) zip(*c.most_common()) values n = int(input()) int(input()) n c = collections.Counter(words) collections.Counter(words) c
import collections

n = int(input())
words = []
for i in range(n):
    words.append(input())

c = collections.Counter(words)

values, counts = zip(*c.most_common())

nums = counts.count(max(counts))
xs = (list(values))[:nums]
xs.sort()

for x in xs:
    print(x)