Buggy python submission (verdict: Time Limit Exceeded):
import collections as col
N=int(input())
S=[]
answer=[]

for _ in range(N):
    S.append(input())
T=sorted(S)
s=col.Counter(T)
values, counts = zip(*s.most_common())
#print(values,counts)



for i in range(len(counts)):
    if counts[i]==max(counts):
        answer.append(values[i])
answer.sort()
for j in answer:
    print(j)
 

Fixed submission:
N=int(input())
S=[input() for _ in range(N)]

S_d={}
A=[]

for i in range(N):
    if S[i] not in S_d.keys():
        S_d[S[i]]=1
    else:
        S_d[S[i]]+=1

max_co=max(S_d.values())

for j in S_d.keys():
    if S_d[j]==max_co:
        A.append(j)

B=sorted(A)

for k in B:
    print(k)

Buggy python submission (verdict: Runtime Error):
import collections as col
N=int(input())
S=[]
answer=[]

for _ in range(N):
    S.append(input())
T=sorted(S)
s=col.Counter(T)
values, counts = zip(*s.most_common())
#print(values,counts)
print(values[0])
t=1

for i in range(N):
    if counts[i]==max(counts):
        answer.append(values[i])
answer.sort()
for j in answer:
    print(j)
 

Fixed submission:
N=int(input())
S=[input() for _ in range(N)]

S_d={}
A=[]

for i in range(N):
    if S[i] not in S_d.keys():
        S_d[S[i]]=1
    else:
        S_d[S[i]]+=1

max_co=max(S_d.values())

for j in S_d.keys():
    if S_d[j]==max_co:
        A.append(j)

B=sorted(A)

for k in B:
    print(k)

Buggy python submission (verdict: Runtime Error):
import collections as col
N=int(input())
counts=[]
A=[]
S=[]
T=[]
U=[]
for _ in range(N):
    S.append(input())
T=sorted(S)
s=col.Counter(T)
values, counts = zip(*s.most_common())

print(values[0])
t=1

while t<=len(values) and counts[t]==counts[t-1]:
    print(values[t])
    t+=1

 

Fixed submission:
N=int(input())
S=[input() for _ in range(N)]

S_d={}
A=[]

for i in range(N):
    if S[i] not in S_d.keys():
        S_d[S[i]]=1
    else:
        S_d[S[i]]+=1

max_co=max(S_d.values())

for j in S_d.keys():
    if S_d[j]==max_co:
        A.append(j)

B=sorted(A)

for k in B:
    print(k)

Buggy python submission (verdict: Runtime Error):
import collections as col
N=int(input())
counts=[]
A=[]
S=[]
T=[]
U=[]
for _ in range(N):
    S.append(input())
T=sorted(S)
s=col.Counter(T)
values, counts = zip(*s.most_common())

print(values[0])
t=1
while counts[t]==counts[t-1]:
    print(values[t])
    t+=1

 

Fixed submission:
N=int(input())
S=[input() for _ in range(N)]

S_d={}
A=[]

for i in range(N):
    if S[i] not in S_d.keys():
        S_d[S[i]]=1
    else:
        S_d[S[i]]+=1

max_co=max(S_d.values())

for j in S_d.keys():
    if S_d[j]==max_co:
        A.append(j)

B=sorted(A)

for k in B:
    print(k)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
counts=[]
A=[]
S=[]
T=[]
U=[]
for _ in range(N):
    s=input()
    S.append(s)
    if s not in T:
        T.append(s)
t=sorted(T)
for i in t:
    U.append(S.count(i))
V=[j for j,v in enumerate(U) if v==max(U)]

for k in V:
    print(t[k])

Fixed submission:
N=int(input())
S=[input() for _ in range(N)]

S_d={}
A=[]

for i in range(N):
    if S[i] not in S_d.keys():
        S_d[S[i]]=1
    else:
        S_d[S[i]]+=1

max_co=max(S_d.values())

for j in S_d.keys():
    if S_d[j]==max_co:
        A.append(j)

B=sorted(A)

for k in B:
    print(k)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=[]
counts=[]
A=[]

for _ in range(N):
    S.append(input())
s=sorted(S)
T=set(s)
t=sorted(list(T))

for i in range(len(T)):
    counts.append(s.count(t[i]))

for j in range(len(t)):
    if counts[j]==max(counts):
        A.append(j)
for k in A:
    print(t[k])

Fixed submission:
N=int(input())
S=[input() for _ in range(N)]

S_d={}
A=[]

for i in range(N):
    if S[i] not in S_d.keys():
        S_d[S[i]]=1
    else:
        S_d[S[i]]+=1

max_co=max(S_d.values())

for j in S_d.keys():
    if S_d[j]==max_co:
        A.append(j)

B=sorted(A)

for k in B:
    print(k)