n = int(input())
d = {}

for i in range(n):
    s = input()
    if s not in d:
        d.update({s: 1})
    else:
        d[s] += 1

max_val = max(d.values())
keys_of_max_val = [key for key in d if d[key] == max_val]
print("\n".join(sorted(keys_of_max_val))) n = int(input()) n int(input()) int input() input d = {} d {} for i in range(n):
    s = input()
    if s not in d:
        d.update({s: 1})
    else:
        d[s] += 1 i range(n) range n s = input() s input() input if s not in d:
        d.update({s: 1})
    else:
        d[s] += 1 s not in d s d d.update({s: 1}) d.update d update {s: 1} s s 1 d[s] += 1 d[s] d s 1 max_val = max(d.values()) max_val max(d.values()) max d.values() d.values d values key for key in d if d[key] == max_val for key in d if d[key] == max_val key d d[key] == max_val d[key] d key max_val if d[key] == max_val key keys_of_max_val = [key for key in d if d[key] == max_val] keys_of_max_val [key for key in d if d[key] == max_val] print("\n".join(sorted(keys_of_max_val))) print "\n".join(sorted(keys_of_max_val)) "\n".join "\n" join sorted(keys_of_max_val) sorted keys_of_max_val max_val = max(d.values()) max(d.values()) max_val n = int(input()) int(input()) n s = input() input() s d = {} {} d keys_of_max_val = [key for key in d if d[key] == max_val] [key for key in d if d[key] == max_val] keys_of_max_val
n = int(input())
d = {}

for i in range(n):
    s = input()
    if s not in d:
        d.update({s: 1})
    else:
        d[s] += 1

max_val = max(d.values())
keys_of_max_val = [key for key in d if d[key] == max_val]
print("\n".join(sorted(keys_of_max_val)))
