Buggy python submission (verdict: Runtime Error):
import collections
n=int(input())
s=list(map(str,input().split()))
k=collections.Counter(s).c.most_common()
l=[]
for i in k:
    if  i[1]==i[0][1]:
      l.append(i[0])
l.sort()
for i in l:
    print(i)

Fixed submission:
import collections

N=int(input())
S=[]
for i in range(N):
	S.append(input())
M=collections.Counter(S)
A=max(M.values())
tmp=[]
for i,j in M.items():
	if j==A:
		tmp.append(i)
ans=sorted(tmp)
for i in range(len(ans)):
	print(ans[i])

Buggy python submission (verdict: Runtime Error):
import collections
n=int(input())
s=input().split()
k=collections.Counter(s).c.most_common()
l=[]
for i in k:
    if  i[1]==i[0][1]:
      l.append(i[0])
l.sort()
for i in l:
    print(i)

Fixed submission:
import collections

N=int(input())
S=[]
for i in range(N):
	S.append(input())
M=collections.Counter(S)
A=max(M.values())
tmp=[]
for i,j in M.items():
	if j==A:
		tmp.append(i)
ans=sorted(tmp)
for i in range(len(ans)):
	print(ans[i])

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n=int(input())
s=input().split()
k=collections.Counter(s).c.most_common()
l=[]
for i in k:
    if  i[1]==i[0][1]:
      l.append(i[0])
l.sort()
for i in l:
    print(i)

Fixed submission:
import collections

N=int(input())
S=[]
for i in range(N):
	S.append(input())
M=collections.Counter(S)
A=max(M.values())
tmp=[]
for i,j in M.items():
	if j==A:
		tmp.append(i)
ans=sorted(tmp)
for i in range(len(ans)):
	print(ans[i])

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n=int(input())
s=input().split()
c=collections.Counter(s)
k=list(c.most_common())
cnt=0
for i in range(n):
    if k[i][1]>cnt:
        cnt=k[i][1]
        l=[k[i][0]]
    elif k[i][1]==cnt:
        l.append(k[i][0])
    else:
        break 
for i in l:
    print(i)

Fixed submission:
import collections

N=int(input())
S=[]
for i in range(N):
	S.append(input())
M=collections.Counter(S)
A=max(M.values())
tmp=[]
for i,j in M.items():
	if j==A:
		tmp.append(i)
ans=sorted(tmp)
for i in range(len(ans)):
	print(ans[i])

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n=int(input())
s=input().split()
c=collections.Counter(s)
k=list(c.most_common())
#print(k[0][0])
cnt=0
for i in range(n):
    if k[i][1]>cnt:
        cnt=k[i][1]
        l=[k[i][0]]
    elif k[i][1]==cnt:
        l.append(k[i][0])
    else:
        break 
for i in l:
    print(i)

Fixed submission:
import collections

N=int(input())
S=[]
for i in range(N):
	S.append(input())
M=collections.Counter(S)
A=max(M.values())
tmp=[]
for i,j in M.items():
	if j==A:
		tmp.append(i)
ans=sorted(tmp)
for i in range(len(ans)):
	print(ans[i])

Buggy python submission (verdict: Runtime Error):
import collections
n=int(input())
s=input().split()
c=collections.Counter(s)
k=list(c.most_common())
cnt=0
for i in range(n):
    if k[i][1]>cnt:
        cnt=k[i][1]
        l=[k[i][0]]
    elif k[i][1]==cnt:
        l.append(k[i][0])
    else:
        break 
for i in l:
    print(i)

Fixed submission:
import collections

N=int(input())
S=[]
for i in range(N):
	S.append(input())
M=collections.Counter(S)
A=max(M.values())
tmp=[]
for i,j in M.items():
	if j==A:
		tmp.append(i)
ans=sorted(tmp)
for i in range(len(ans)):
	print(ans[i])