from collections import defaultdict

d = defaultdict(int)
for _ in range(int(input())):
    d[input()] += 1
mx = max(d.values())
print('\n'.join(sorted([k for k in d.keys() if d[k] == mx]))) from collections import defaultdict d = defaultdict(int) d defaultdict(int) defaultdict int for _ in range(int(input())):
    d[input()] += 1 _ range(int(input())) range int(input()) int input() input d[input()] += 1 d[input()] d input() input 1 mx = max(d.values()) mx max(d.values()) max d.values() d.values d values k for k in d.keys() if d[k] == mx for k in d.keys() if d[k] == mx k d.keys() d.keys d keys d[k] == mx d[k] d k mx if d[k] == mx k print('\n'.join(sorted([k for k in d.keys() if d[k] == mx]))) print '\n'.join(sorted([k for k in d.keys() if d[k] == mx])) '\n'.join '\n' join sorted([k for k in d.keys() if d[k] == mx]) sorted [k for k in d.keys() if d[k] == mx] mx = max(d.values()) max(d.values()) mx d = defaultdict(int) defaultdict(int) d
from collections import defaultdict

d = defaultdict(int)
for _ in range(int(input())):
    d[input()] += 1
mx = max(d.values())
print('\n'.join(sorted([k for k in d.keys() if d[k] == mx])))