from collections import Counter

n = int(input())
s = Counter([str(input()) for _ in range(n)])
l = []
c = 1

for stri, count in s.items():
    if count == c:
        c = count
        l.append(stri)
    elif count > c:
        c = count
        l.clear()
        l.append(stri)


sort_l = sorted(l)

for i in sort_l:
    print(i) from collections import Counter n = int(input()) n int(input()) int input() input str(input()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) str(input()) str input() input s = Counter([str(input()) for _ in range(n)]) s Counter([str(input()) for _ in range(n)]) Counter [str(input()) for _ in range(n)] l = [] l [] c = 1 c 1 for stri, count in s.items():
    if count == c:
        c = count
        l.append(stri)
    elif count > c:
        c = count
        l.clear()
        l.append(stri) stri count s.items() s.items s items if count == c:
        c = count
        l.append(stri)
    elif count > c:
        c = count
        l.clear()
        l.append(stri) count == c count c c = count c count l.append(stri) l.append l append stri elif count > c:
        c = count
        l.clear()
        l.append(stri) count > c count c c = count c count l.clear() l.clear l clear l.append(stri) l.append l append stri sort_l = sorted(l) sort_l sorted(l) sorted l for i in sort_l:
    print(i) i sort_l print(i) print i l = [] [] l c = count count c s = Counter([str(input()) for _ in range(n)]) Counter([str(input()) for _ in range(n)]) s c = count count c sort_l = sorted(l) sorted(l) sort_l n = int(input()) int(input()) n c = 1 1 c
from collections import Counter

n = int(input())
s = Counter([str(input()) for _ in range(n)])
l = []
c = 1

for stri, count in s.items():
    if count == c:
        c = count
        l.append(stri)
    elif count > c:
        c = count
        l.clear()
        l.append(stri)


sort_l = sorted(l)

for i in sort_l:
    print(i)
