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

N=int(input())
S=[]

for _ in range(N):
    s=input()
    S.append(s)

c=OrderedDict(sorted(S))

max_s_list= [kv[0] for kv in c.items() if kv[1]==max(c.values())]

for a in max_s_list:
    print(a)

Fixed submission:
from collections import Counter

N=int(input())
S=[]

for _ in range(N):
    s=input()
    S.append(s)

c=Counter(S)
arr=c.most_common()

maxnum=arr[0][1]
ans=[]

for i in range(len(arr)):
    if arr[i][1]==maxnum:
        ans.append(arr[i][0])        
    else:
        break
FA=sorted(ans)
for j in FA:
    print(j)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

N=int(input())
S=[]

for _ in range(N):
    s=input()
    S.append(s)

c=Counter(S)

max_s_list= [kv[0] for kv in c.items() if kv[1]==max(c.values())]

ans=sorted(max_s_list)
for a in ans:
    print(a)

Fixed submission:
from collections import Counter

N=int(input())
S=[]

for _ in range(N):
    s=input()
    S.append(s)

c=Counter(S)
arr=c.most_common()

maxnum=arr[0][1]
ans=[]

for i in range(len(arr)):
    if arr[i][1]==maxnum:
        ans.append(arr[i][0])        
    else:
        break
FA=sorted(ans)
for j in FA:
    print(j)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
Sarr1=[]
Sarr2=[]
for _ in range(N):
    s=input()
    if Sarr1.count(s)==0:
        Sarr1.append(s)
        Sarr2.append(0)
    else:
        i=Sarr1.index(s)
        Sarr2[i]+=1
ans=[]
for i in range(len(Sarr2)):
    if Sarr2[i]==max(Sarr2):
        ans.append(Sarr1[i])
    else:
        pass
FA=sorted(ans)
for z in FA:
    print(z)


Fixed submission:
from collections import Counter

N=int(input())
S=[]

for _ in range(N):
    s=input()
    S.append(s)

c=Counter(S)
arr=c.most_common()

maxnum=arr[0][1]
ans=[]

for i in range(len(arr)):
    if arr[i][1]==maxnum:
        ans.append(arr[i][0])        
    else:
        break
FA=sorted(ans)
for j in FA:
    print(j)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
Sarr1=[]
Sarr2=[]
for _ in range(N):
    s=input()
    if Sarr1.count(s)==0:
        Sarr1.append(s)
        Sarr2.append(0)
    else:
        i=Sarr1.index(s)
        Sarr2[i]+=1
ans=[]
m=max(Sarr2)
for i in range(len(Sarr2)):
    if Sarr2[i]==m:
        ans.append(Sarr1[i])
    else:
        pass
FA=sorted(ans)
for z in FA:
    print(z)

Fixed submission:
from collections import Counter

N=int(input())
S=[]

for _ in range(N):
    s=input()
    S.append(s)

c=Counter(S)
arr=c.most_common()

maxnum=arr[0][1]
ans=[]

for i in range(len(arr)):
    if arr[i][1]==maxnum:
        ans.append(arr[i][0])        
    else:
        break
FA=sorted(ans)
for j in FA:
    print(j)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
Sarr1=[]
Sarr2=[]
for _ in range(N):
    s=input()
    if Sarr1.count(s)==0:
        Sarr1.append(s)
        Sarr2.append(0)
    else:
        i=Sarr1.index(s)
        Sarr2[i]+=1
ans=[]
for i in range(len(Sarr2)):
    if Sarr2[i]==max(Sarr2):
        ans.append(Sarr1[i])
    else:
        pass
FA=sorted(ans)
for z in FA:
    print(z)

Fixed submission:
from collections import Counter

N=int(input())
S=[]

for _ in range(N):
    s=input()
    S.append(s)

c=Counter(S)
arr=c.most_common()

maxnum=arr[0][1]
ans=[]

for i in range(len(arr)):
    if arr[i][1]==maxnum:
        ans.append(arr[i][0])        
    else:
        break
FA=sorted(ans)
for j in FA:
    print(j)