from collections import Counter

n = int(input())
s = Counter()

for _ in range(n):
    s.update({input():1})

t = s.most_common()

ans = []
for item in t:
    if item[1] != t[0][1]:
        break
    ans.append(item[0])

ans = sorted(ans)

for i in ans:
    print(i) from collections import Counter n = int(input()) n int(input()) int input() input s = Counter() s Counter() Counter for _ in range(n):
    s.update({input():1}) _ range(n) range n s.update({input():1}) s.update s update {input():1} input() input() input 1 t = s.most_common() t s.most_common() s.most_common s most_common ans = [] ans [] for item in t:
    if item[1] != t[0][1]:
        break
    ans.append(item[0]) item t if item[1] != t[0][1]:
        break
     item[1] != t[0][1] item[1] item 1 t[0][1] [0] t 0 1 break ans.append(item[0]) ans.append ans append item[0] item 0 ans = sorted(ans) ans sorted(ans) sorted ans for i in ans:
    print(i) i ans print(i) print i ans = [] [] ans n = int(input()) int(input()) n t = s.most_common() s.most_common() t ans = sorted(ans) sorted(ans) ans s = Counter() Counter() s
from collections import Counter

n = int(input())
s = Counter()

for _ in range(n):
    s.update({input():1})

t = s.most_common()

ans = []
for item in t:
    if item[1] != t[0][1]:
        break
    ans.append(item[0])

ans = sorted(ans)

for i in ans:
    print(i)