Buggy python submission (verdict: Runtime Error):
import collections

N=int(input())
data=[input() for i in range(N)]
c = collections.Counter(data)
score=c
com=c.most_common()

score_sorted = sorted(score.items(), key=lambda x:x[1], reverse=True)

val=score_sorted
L=len(val)
count="Yes"
ii=0
ansa=1
while count=="Yes":
    if val[ii][1]==val[ii+1][1]:
        ii+=1

        ansa+=1
        if ii == L-1:
            break
    else:
        count="No"
data2=[]
for i in range(ansa):
    data2.append(val[i][0])

data2.sort()
for i in range(ansa):
    print(data2[i])

Fixed submission:
import collections

N=int(input())
data=[input() for i in range(N)]
c = collections.Counter(data)
score=c
com=c.most_common()

score_sorted = sorted(score.items(), key=lambda x:x[1], reverse=True)

val=score_sorted
L=len(val)
count="Yes"
ii=0
ansa=1
if L==1:
    print(val[0][0])
else:
    while count=="Yes":
        if val[ii][1]==val[ii+1][1]:
            ii+=1

            ansa+=1
            if ii == L-1:
                break
        else:
            count="No"
    data2=[]
    for i in range(ansa):
        data2.append(val[i][0])

    data2.sort()
    for i in range(ansa):
        print(data2[i])

Buggy python submission (verdict: Runtime Error):
import collections

N=int(input())
data=[input() for i in range(N)]
c = collections.Counter(data)
score=c
com=c.most_common()

score_sorted = sorted(score.items(), key=lambda x:x[1], reverse=True)

val=score_sorted

count="Yes"
ii=0
ansa=1
while count=="Yes":
    if val[ii][1]==val[ii+1][1]:
        ii+=1
        ansa+=1
    else:
        count="No"
data2=[]
for i in range(ansa):
    data2.append(val[i][0])
    
data2.sort()
for i in range(ansa):
    print(data2[i])

Fixed submission:
import collections

N=int(input())
data=[input() for i in range(N)]
c = collections.Counter(data)
score=c
com=c.most_common()

score_sorted = sorted(score.items(), key=lambda x:x[1], reverse=True)

val=score_sorted
L=len(val)
count="Yes"
ii=0
ansa=1
if L==1:
    print(val[0][0])
else:
    while count=="Yes":
        if val[ii][1]==val[ii+1][1]:
            ii+=1

            ansa+=1
            if ii == L-1:
                break
        else:
            count="No"
    data2=[]
    for i in range(ansa):
        data2.append(val[i][0])

    data2.sort()
    for i in range(ansa):
        print(data2[i])

Buggy python submission (verdict: Runtime Error):
import collections

N=int(input())
data=[input() for i in range(N)]
c = collections.Counter(data)
score=c
com=c.most_common()
#val=c.values()
#dada=list(val)
#dada.sort()
score_sorted = sorted(score.items(), key=lambda x:x[1], reverse=True)
#print(val)
#val.sort()
#print(dada)
#print(score_sorted)
val=score_sorted
#print("val==",val)
#key=score_sorted.keys()
#dada=list(val)
#dada.sort()
count="Yes"
ii=0
ansa=1
while count=="Yes":
    if val[ii][1]==val[ii+1][1]:
        ii+=1
        ansa+=1
    else:
        count="No"
data2=[]
for i in range(ansa):
    data2.append(val[i][0])
    #print(i,data2)
data2.sort()
for i in range(ansa):
    print(data2[i])

Fixed submission:
import collections

N=int(input())
data=[input() for i in range(N)]
c = collections.Counter(data)
score=c
com=c.most_common()

score_sorted = sorted(score.items(), key=lambda x:x[1], reverse=True)

val=score_sorted
L=len(val)
count="Yes"
ii=0
ansa=1
if L==1:
    print(val[0][0])
else:
    while count=="Yes":
        if val[ii][1]==val[ii+1][1]:
            ii+=1

            ansa+=1
            if ii == L-1:
                break
        else:
            count="No"
    data2=[]
    for i in range(ansa):
        data2.append(val[i][0])

    data2.sort()
    for i in range(ansa):
        print(data2[i])