import collections

n = int(input())

li=[]


for i in range(n):
    li.append(input())

cnt = collections.Counter(li)
S = cnt.most_common()


C =len(cnt)

li_1 = [S[0][0]]

for i in range(C-1):
    if S[i][1] == S[i+1][1]:
        li_1.append(S[i+1][0])
    else:
        break

li_1.sort()

for i in li_1:
    print(i) import collections collections n = int(input()) n int(input()) int input() input li=[] li [] for i in range(n):
    li.append(input()) i range(n) range n li.append(input()) li.append li append input() input cnt = collections.Counter(li) cnt collections.Counter(li) collections.Counter collections Counter li S = cnt.most_common() S cnt.most_common() cnt.most_common cnt most_common C =len(cnt) C len(cnt) len cnt li_1 = [S[0][0]] li_1 [S[0][0]] S[0][0] [0] S 0 0 for i in range(C-1):
    if S[i][1] == S[i+1][1]:
        li_1.append(S[i+1][0])
    else:
        break i range(C-1) range C-1 C 1 if S[i][1] == S[i+1][1]:
        li_1.append(S[i+1][0])
    else:
        break S[i][1] == S[i+1][1] S[i][1] [i] S i 1 S[i+1][1] [i+1] S i+1 i 1 1 li_1.append(S[i+1][0]) li_1.append li_1 append S[i+1][0] [i+1] S i+1 i 1 0 break li_1.sort() li_1.sort li_1 sort for i in li_1:
    print(i) i li_1 print(i) print i C =len(cnt) len(cnt) C n = int(input()) int(input()) n li=[] [] li S = cnt.most_common() cnt.most_common() S cnt = collections.Counter(li) collections.Counter(li) cnt li_1 = [S[0][0]] [S[0][0]] li_1
import collections

n = int(input())

li=[]


for i in range(n):
    li.append(input())

cnt = collections.Counter(li)
S = cnt.most_common()


C =len(cnt)

li_1 = [S[0][0]]

for i in range(C-1):
    if S[i][1] == S[i+1][1]:
        li_1.append(S[i+1][0])
    else:
        break

li_1.sort()

for i in li_1:
    print(i)
