n = int(input())
d = {}
t = 0
for i in range(n):
    s = input()
    d[s] = d.get(s, 0) + 1
    t = max(t, d[s])
    
for key in sorted(d):
    if d[key] == t:
        print(key) n = int(input()) n int(input()) int input() input d = {} d {} t = 0 t 0 for i in range(n):
    s = input()
    d[s] = d.get(s, 0) + 1
    t = max(t, d[s])
     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 t = max(t, d[s]) t max(t, d[s]) max t d[s] d s for key in sorted(d):
    if d[key] == t:
        print(key) key sorted(d) sorted d if d[key] == t:
        print(key) d[key] == t d[key] d key t print(key) print key d = {} {} d s = input() input() s t = max(t, d[s]) max(t, d[s]) t n = int(input()) int(input()) n t = 0 0 t
n = int(input())
d = {}
t = 0
for i in range(n):
    s = input()
    d[s] = d.get(s, 0) + 1
    t = max(t, d[s])
    
for key in sorted(d):
    if d[key] == t:
        print(key)