from collections import Counter
N = int(input())
S = []
for _ in range(N):
    S.append(input())
S.sort()
C = Counter(S)
C = sorted(C.items(), key=lambda x:x[1], reverse=True)
vm = 0
for k, v in C:
    if v >= vm:
        vm = v
        print(k)
    else:
        break from collections import Counter N = int(input()) N int(input()) int input() input S = [] S [] for _ in range(N):
    S.append(input()) _ range(N) range N S.append(input()) S.append S append input() input S.sort() S.sort S sort C = Counter(S) C Counter(S) Counter S C = sorted(C.items(), key=lambda x:x[1], reverse=True) C sorted(C.items(), key=lambda x:x[1], reverse=True) sorted C.items() C.items C items key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x reverse=True reverse True vm = 0 vm 0 for k, v in C:
    if v >= vm:
        vm = v
        print(k)
    else:
        break k v C if v >= vm:
        vm = v
        print(k)
    else:
        break v >= vm v vm vm = v vm v print(k) print k break vm = 0 0 vm C = sorted(C.items(), key=lambda x:x[1], reverse=True) sorted(C.items(), key=lambda x:x[1], reverse=True) C N = int(input()) int(input()) N S = [] [] S C = Counter(S) Counter(S) C vm = v v vm
from collections import Counter
N = int(input())
S = []
for _ in range(N):
    S.append(input())
S.sort()
C = Counter(S)
C = sorted(C.items(), key=lambda x:x[1], reverse=True)
vm = 0
for k, v in C:
    if v >= vm:
        vm = v
        print(k)
    else:
        break