n = int(input())

memo = {}

for _ in range(n):
    s = input()
    try:
        memo[s] += 1
    except KeyError:
        memo[s] = 1

m = max(memo.values())

print(*sorted([ i for i, j in memo.items() if j == m]), sep='\n') n = int(input()) n int(input()) int input() input memo = {} memo {} for _ in range(n):
    s = input()
    try:
        memo[s] += 1
    except KeyError:
        memo[s] = 1 _ range(n) range n s = input() s input() input try:
        memo[s] += 1
    except KeyError:
        memo[s] = 1 except KeyError:
        memo[s] = 1 memo[s] = 1 memo[s] memo s 1 memo[s] += 1 memo[s] memo s 1 m = max(memo.values()) m max(memo.values()) max memo.values() memo.values memo values i for i, j in memo.items() if j == m for i, j in memo.items() if j == m i j memo.items() memo.items memo items j == m j m if j == m i print(*sorted([ i for i, j in memo.items() if j == m]), sep='\n') print *sorted([ i for i, j in memo.items() if j == m]) sorted([ i for i, j in memo.items() if j == m]) sorted [ i for i, j in memo.items() if j == m] sep='\n' sep '\n' s = input() input() s m = max(memo.values()) max(memo.values()) m n = int(input()) int(input()) n memo = {} {} memo
n = int(input())

memo = {}

for _ in range(n):
    s = input()
    try:
        memo[s] += 1
    except KeyError:
        memo[s] = 1

m = max(memo.values())

print(*sorted([ i for i, j in memo.items() if j == m]), sep='\n')
