n=int(input())
A=[]
for i in range(n):
    a=str(input())
    A.append(a)
import collections
c = collections.Counter(A)
ma= c.most_common()[0][1]
C=[i[0] for i in c.items() if i[1] >=ma ]
C.sort(reverse=False)
for j in range(len(C)):
    print(C[j]) n=int(input()) n int(input()) int input() input A=[] A [] for i in range(n):
    a=str(input())
    A.append(a) i range(n) range n a=str(input()) a str(input()) str input() input A.append(a) A.append A append a import collections collections c = collections.Counter(A) c collections.Counter(A) collections.Counter collections Counter A ma= c.most_common()[0][1] ma c.most_common()[0][1] [0] c.most_common() c.most_common c most_common 0 1 i[0] for i in c.items() if i[1] >=ma for i in c.items() if i[1] >=ma i c.items() c.items c items i[1] >=ma i[1] i 1 ma if i[1] >=ma i[0] i 0 C=[i[0] for i in c.items() if i[1] >=ma ] C [i[0] for i in c.items() if i[1] >=ma ] C.sort(reverse=False) C.sort C sort reverse=False reverse False for j in range(len(C)):
    print(C[j]) j range(len(C)) range len(C) len C print(C[j]) print C[j] C j C=[i[0] for i in c.items() if i[1] >=ma ] [i[0] for i in c.items() if i[1] >=ma ] C n=int(input()) int(input()) n A=[] [] A c = collections.Counter(A) collections.Counter(A) c ma= c.most_common()[0][1] c.most_common()[0][1] ma a=str(input()) str(input()) a
n=int(input())
A=[]
for i in range(n):
    a=str(input())
    A.append(a)
import collections
c = collections.Counter(A)
ma= c.most_common()[0][1]
C=[i[0] for i in c.items() if i[1] >=ma ]
C.sort(reverse=False)
for j in range(len(C)):
    print(C[j])