from collections import defaultdict

n = int(input())
counter = defaultdict(int)
for _ in range(n):
    s = input()
    counter[s] += 1

l = [(-n, s) for s, n in counter.items()]
l.sort()
m = l[0][0]

for x, s in l:
    if x != m:
        break
    print(s) from collections import defaultdict n = int(input()) n int(input()) int input() input counter = defaultdict(int) counter defaultdict(int) defaultdict int for _ in range(n):
    s = input()
    counter[s] += 1 _ range(n) range n s = input() s input() input counter[s] += 1 counter[s] counter s 1 (-n, s) for s, n in counter.items() for s, n in counter.items() s n counter.items() counter.items counter items for s, n in counter.items() (-n, s) -n n s l = [(-n, s) for s, n in counter.items()] l [(-n, s) for s, n in counter.items()] l.sort() l.sort l sort m = l[0][0] m l[0][0] [0] l 0 0 for x, s in l:
    if x != m:
        break
    print(s) x s l if x != m:
        break
     x != m x m break print(s) print s l = [(-n, s) for s, n in counter.items()] [(-n, s) for s, n in counter.items()] l m = l[0][0] l[0][0] m s = input() input() s counter = defaultdict(int) defaultdict(int) counter n = int(input()) int(input()) n
from collections import defaultdict

n = int(input())
counter = defaultdict(int)
for _ in range(n):
    s = input()
    counter[s] += 1

l = [(-n, s) for s, n in counter.items()]
l.sort()
m = l[0][0]

for x, s in l:
    if x != m:
        break
    print(s)
