Buggy python submission (verdict: Runtime Error):
n = int(input())
data_list = [input() for i in range(n)]
data_list.sort()

count_dict = collections.Counter(data_list)

max_val = max(count_dict.values())
max_keys = [key for key in count_dict if count_dict[key] == max_val]

for i in range(len(max_keys)):
    print(max_keys[i])

Fixed submission:
import collections

n = int(input())
data_list = [input() for i in range(n)]
data_list.sort()

count_dict = collections.Counter(data_list)

max_val = max(count_dict.values())
max_keys = [key for key in count_dict if count_dict[key] == max_val]

max_keys.sort()

for i in range(len(max_keys)):
    print(max_keys[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
data_list = [input() for i in range(n)]
data_list.sort()


data_set = set(data_list)
sorted_list = sorted(data_set)

count_list = [0] * len(sorted_list)

for i in range(len(sorted_list)):
    count_list[i] = data_list.count(sorted_list[i])

max_indexes = [i for i, x in enumerate(count_list) if x == max(count_list)]

for i in range(len(max_indexes)):
    print(sorted_list[max_indexes[i]])

Fixed submission:
import collections

n = int(input())
data_list = [input() for i in range(n)]
data_list.sort()

count_dict = collections.Counter(data_list)

max_val = max(count_dict.values())
max_keys = [key for key in count_dict if count_dict[key] == max_val]

max_keys.sort()

for i in range(len(max_keys)):
    print(max_keys[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
data_list = [input() for i in range(n)]
data_list.sort()


data_set = set(data_list)
sorted_list = sorted(data_set)

count_list = [0] * len(sorted_list)

for i in range(len(sorted_list)):
    count_list[i] = data_list.count(sorted_list[i])

max_indexes = [i for i, x in enumerate(count_list) if x == max(count_list)]

for i in range(len(max_indexes)):
    print(sorted_list[max_indexes[i]])

Fixed submission:
import collections

n = int(input())
data_list = [input() for i in range(n)]
data_list.sort()

count_dict = collections.Counter(data_list)

max_val = max(count_dict.values())
max_keys = [key for key in count_dict if count_dict[key] == max_val]

max_keys.sort()

for i in range(len(max_keys)):
    print(max_keys[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
data_list = [input() for i in range(n)]
data_list.sort()


data_set = set(data_list)
sorted_list = sorted(data_set)

count_list = [0] * len(sorted_list)

for i in range(len(sorted_list)):
    for j in range(len(data_list)):
        if sorted_list[i] == data_list[j]:
            count_list[i] +=1

max_indexes = [i for i, x in enumerate(count_list) if x == max(count_list)]

for i in range(len(max_indexes)):
    print(sorted_list[max_indexes[i]])

Fixed submission:
import collections

n = int(input())
data_list = [input() for i in range(n)]
data_list.sort()

count_dict = collections.Counter(data_list)

max_val = max(count_dict.values())
max_keys = [key for key in count_dict if count_dict[key] == max_val]

max_keys.sort()

for i in range(len(max_keys)):
    print(max_keys[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
data_list = [input() for i in range(n)]
data_list.sort()


data_set = set(data_list)
sorted_list = sorted(data_set)

count_list = [0] * len(sorted_list)

for i in range(len(sorted_list)):
    for j in range(len(data_list)):
        if sorted_list[i] == data_list[j]:
            count_list[i] +=1

max_indexes = [i for i, x in enumerate(count_list) if x == max(count_list)]

for i in range(len(max_indexes)):
    print(sorted_list[max_indexes[i]])

Fixed submission:
import collections

n = int(input())
data_list = [input() for i in range(n)]
data_list.sort()

count_dict = collections.Counter(data_list)

max_val = max(count_dict.values())
max_keys = [key for key in count_dict if count_dict[key] == max_val]

max_keys.sort()

for i in range(len(max_keys)):
    print(max_keys[i])