#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]


n = int(input())
s = [input() for _ in range(n)]


h = {}

for i in range(n):
    if (s[i] in h):
        h[s[i]] += 1
    else:
        h[s[i]] = 1


ans = []
highScore = max(h.values())

for k,v in h.items():
    if v== highScore:
        ans.append(k)

ans.sort()

for i in range(len(ans)):
    print(ans[i])

 n = int(input()) n int(input()) int input() input input() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) input() input s = [input() for _ in range(n)] s [input() for _ in range(n)] h = {} h {} for i in range(n):
    if (s[i] in h):
        h[s[i]] += 1
    else:
        h[s[i]] = 1 i range(n) range n if (s[i] in h):
        h[s[i]] += 1
    else:
        h[s[i]] = 1 s[i] in h s[i] s i h h[s[i]] += 1 h[s[i]] h s[i] s i 1 h[s[i]] = 1 h[s[i]] h s[i] s i 1 ans = [] ans [] highScore = max(h.values()) highScore max(h.values()) max h.values() h.values h values for k,v in h.items():
    if v== highScore:
        ans.append(k) k v h.items() h.items h items if v== highScore:
        ans.append(k) v== highScore v highScore ans.append(k) ans.append ans append k ans.sort() ans.sort ans sort for i in range(len(ans)):
    print(ans[i]) i range(len(ans)) range len(ans) len ans print(ans[i]) print ans[i] ans i h = {} {} h s = [input() for _ in range(n)] [input() for _ in range(n)] s ans = [] [] ans n = int(input()) int(input()) n highScore = max(h.values()) max(h.values()) highScore
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]


n = int(input())
s = [input() for _ in range(n)]


h = {}

for i in range(n):
    if (s[i] in h):
        h[s[i]] += 1
    else:
        h[s[i]] = 1


ans = []
highScore = max(h.values())

for k,v in h.items():
    if v== highScore:
        ans.append(k)

ans.sort()

for i in range(len(ans)):
    print(ans[i])


