Buggy python submission (verdict: Time Limit Exceeded):
num = input()
l = []
for i in range(0,int(num)):
    l.append(input())

cnt = []
l_t = list(set(l))
keys = []
max_v = 0
for item in l_t:
    if max_v < l.count(item):
        max_v = l.count(item)
        keys = []
        keys.append(item)
    elif max_v == l.count(item):
        keys.append(item)

for i in sorted(keys):
    print(i)

Fixed submission:
from collections import Counter
N = int(input())
S = Counter(input() for _ in range(N))
m = max(S.values())
for v in sorted(k for k, v in S.items() if v == m):
	print(v)

Buggy python submission (verdict: Time Limit Exceeded):

num = input()
l = []
for i in range(0,int(num)):
    l.append(input())

cnt = []
l_t = list(set(l))
keys = []
max_v = 0
for item in l_t:
    if max_v < l.count(item):
        max_v = l.count(item)
        keys = []
        keys.append(item)
    elif max_v == l.count(item):
        keys.append(item)

for i in sorted(keys):
    print(i)
    
    keys.append(item)

Fixed submission:
from collections import Counter
N = int(input())
S = Counter(input() for _ in range(N))
m = max(S.values())
for v in sorted(k for k, v in S.items() if v == m):
	print(v)

Buggy python submission (verdict: Time Limit Exceeded):

num = input()
l = []
for i in range(0,int(num)):
    l.append(input())

cnt = []
l_t = list(set(l))
for item in l_t:
    cnt.append(l.count(item))

max_v = max(cnt)

keys = []

for i in range(0,len(cnt)):
    if cnt[i] == max_v:
        keys.append(l_t[i])

for i in sorted(keys):
    print(i)

Fixed submission:
from collections import Counter
N = int(input())
S = Counter(input() for _ in range(N))
m = max(S.values())
for v in sorted(k for k, v in S.items() if v == m):
	print(v)

Buggy python submission (verdict: Time Limit Exceeded):
num = input()
l = []
for i in range(0,int(num)):
    l.append(input())

cnt = []
l_t = list(set(l))
for item in l_t:
    cnt.append(l.count(item))

num_dict = dict(zip(l_t,cnt))
max_v = max(num_dict.values())

keys = []

for word, num in num_dict.items():
    if num == max_v:
        keys.append(word)

for i in sorted(keys):
    print(i)

Fixed submission:
from collections import Counter
N = int(input())
S = Counter(input() for _ in range(N))
m = max(S.values())
for v in sorted(k for k, v in S.items() if v == m):
	print(v)

Buggy python submission (verdict: Runtime Error):

num = input()
l = []
for i in range(0,int(num)):
    l.append(input())

cnt = []
l_t = list(set(l))
for item in l_t:
    cnt.append(l.count(item))

num_dict = dict(zip(l_t),cnt))
max_v = max(num_dict.values())

keys = []

for word, num in num_dict.items():
    if num == max_v:
        keys.append(word)

for i in sorted(keys):
    print(i)

Fixed submission:
from collections import Counter
N = int(input())
S = Counter(input() for _ in range(N))
m = max(S.values())
for v in sorted(k for k, v in S.items() if v == m):
	print(v)

Buggy python submission (verdict: Time Limit Exceeded):

num = input()
l = []
for i in range(0,int(num)):
    l.append(input())

cnt = []
for item in list(set(l)):
    cnt.append(l.count(item))

num_dict = dict(zip(list(set(l)),cnt))
max_v = max(num_dict.values())

keys = []

for word, num in num_dict.items():
    if num == max_v:
        keys.append(word)

for i in sorted(keys):
    print(i)

Fixed submission:
from collections import Counter
N = int(input())
S = Counter(input() for _ in range(N))
m = max(S.values())
for v in sorted(k for k, v in S.items() if v == m):
	print(v)