from collections import  Counter
n = int(input())
lst = []
for _ in range(n):
    lst.append(input())

C = Counter(lst)
x = max(C.values())
anslst = []
for k,v in C.items():
    if v == x:
        anslst.append(k)
anslst.sort()
for v in anslst:
    print(v) from collections import  Counter n = int(input()) n int(input()) int input() input lst = [] lst [] for _ in range(n):
    lst.append(input()) _ range(n) range n lst.append(input()) lst.append lst append input() input C = Counter(lst) C Counter(lst) Counter lst x = max(C.values()) x max(C.values()) max C.values() C.values C values anslst = [] anslst [] for k,v in C.items():
    if v == x:
        anslst.append(k) k v C.items() C.items C items if v == x:
        anslst.append(k) v == x v x anslst.append(k) anslst.append anslst append k anslst.sort() anslst.sort anslst sort for v in anslst:
    print(v) v anslst print(v) print v lst = [] [] lst n = int(input()) int(input()) n C = Counter(lst) Counter(lst) C x = max(C.values()) max(C.values()) x anslst = [] [] anslst
from collections import  Counter
n = int(input())
lst = []
for _ in range(n):
    lst.append(input())

C = Counter(lst)
x = max(C.values())
anslst = []
for k,v in C.items():
    if v == x:
        anslst.append(k)
anslst.sort()
for v in anslst:
    print(v)