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

input = sys.stdin.readline

n = int(input())
s = [input() for i in range(n)]

c_sort = collections.Counter(s).most_common()
list_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]
for i in list_most:
    print(i)

Fixed submission:
import collections

n = int(input())
s = [input() for _ in range(n)]
c_sort = collections.Counter(s).most_common()
list_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]
for i in sorted(list_most):
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = []
dict = {}

for _ in range(n):
    car = input()
    s.append(car)

for i in range(n):
    if s[i] not in dict:
        dict[s[i]] = s.count(s[i])

max_d_list = [d[0] for d in dict.items() if d[1] == max(dict.values())]
sorted_list = sorted(max_d_list)
for i in sorted_list:
    print(i)

Fixed submission:
import collections

n = int(input())
s = [input() for _ in range(n)]
c_sort = collections.Counter(s).most_common()
list_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]
for i in sorted(list_most):
    print(i)

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

input = sys.stdin.readline

n = int(input())
s = [input() for i in range(n)]
dict = {}

for i in range(n):
    if s[i] not in dict:
        dict[s[i]], s.count(s[i])]

max_d_list = [d[0] for d in dict.items() if d[1] == max(dict.values())]
sorted_list = sorted(max_d_list)
for i in sorted_list:
    print(i)

Fixed submission:
import collections

n = int(input())
s = [input() for _ in range(n)]
c_sort = collections.Counter(s).most_common()
list_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]
for i in sorted(list_most):
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = []
list1 = []
list2 = []

for _ in range(n):
    car = input()
    s.append(car)

for i in range(n):
    if s[i] not in list1:
        list1.append(s[i])
        list2.append(s.count(s[i]))

maxs = [i for i in range(len(list2)) if list2[i] == max(list2)]
max_char = [list1[i] for i in maxs]
max_char_jisho = sorted(max_char)

for i in max_char_jisho:
    print(i)

Fixed submission:
import collections

n = int(input())
s = [input() for _ in range(n)]
c_sort = collections.Counter(s).most_common()
list_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]
for i in sorted(list_most):
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = []
list1 = []
list2 = []

for _ in range(n):
    car = input()
    s.append(car)

for i in range(n):
    if s[i] in list1:
        list2[list1.index(s[i])] += 1
    else:
        list1.append(s[i])
        list2.append(1)

maxs = [i for i in range(len(list2)) if list2[i] == max(list2)]
max_char = [list1[i] for i in maxs]
max_char_jisho = sorted(max_char)

for i in max_char_jisho:
    print(i)

Fixed submission:
import collections

n = int(input())
s = [input() for _ in range(n)]
c_sort = collections.Counter(s).most_common()
list_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]
for i in sorted(list_most):
    print(i)