n = int(input())
d = {}
for i in range(n):
    s = input()
    d[s] = d.get(s, 0) + 1
m = max(d.values())
for s in sorted(s for s in d if d[s] == m):
    print(s) n = int(input()) n int(input()) int input() input d = {} d {} for i in range(n):
    s = input()
    d[s] = d.get(s, 0) + 1 i range(n) range n s = input() s input() input d[s] = d.get(s, 0) + 1 d[s] d s d.get(s, 0) + 1 d.get(s, 0) d.get d get s 0 1 m = max(d.values()) m max(d.values()) max d.values() d.values d values for s in sorted(s for s in d if d[s] == m):
    print(s) s sorted(s for s in d if d[s] == m) sorted s print(s) print s d = {} {} d s = input() input() s n = int(input()) int(input()) n m = max(d.values()) max(d.values()) m
n = int(input())
d = {}
for i in range(n):
    s = input()
    d[s] = d.get(s, 0) + 1
m = max(d.values())
for s in sorted(s for s in d if d[s] == m):
    print(s)
