Buggy python submission (verdict: Time Limit Exceeded):
import  collections 
N = int(input())
# list_a = [str(i) input() for i in range(N)]
list_a = []
for i in range (0,N):
    a = input()
    list_a.append(a)
dict_a = collections.Counter(list_a)
 
 
list_ans = []
 
list_ans.append(dict_a.most_common()[0][0])
a = dict_a.most_common()[0][1]
for i in range (1,len(dict_a)):
    if a == dict_a.most_common()[i][1]:
        list_ans.append(dict_a.most_common()[i][0])
 
list_ans.sort()
for i in range (0,len(list_ans)):
    print(list_ans[i])

Fixed submission:
N = int(input())
S = [input() for i in range(N)]
dictionary = {}
for word in S:
    if word in dictionary:
        dictionary[word] += 1
    else:
        dictionary[word] = 1

maximum = max(dictionary.values())
for key, value in sorted(dictionary.items()):
    if value == maximum:
        print(key)

Buggy python submission (verdict: Time Limit Exceeded):
import  collections 
N = int(input())
list_a = []
 
for i in range (0,N):
    a = input()
    list_a.append(a)
dict_a = collections.Counter(list_a)
 
 
list_ans = []
 
list_ans.append(dict_a.most_common()[0][0])
a = dict_a.most_common()[0][1]
for i in range (1,len(dict_a)):
    if a == dict_a.most_common()[i][1]:
        list_ans.append(dict_a.most_common()[i][0])
 
list_ans.sort()
for i in range (0,len(list_ans)):
    print(list_ans[i])

Fixed submission:
N = int(input())
S = [input() for i in range(N)]
dictionary = {}
for word in S:
    if word in dictionary:
        dictionary[word] += 1
    else:
        dictionary[word] = 1

maximum = max(dictionary.values())
for key, value in sorted(dictionary.items()):
    if value == maximum:
        print(key)

Buggy python submission (verdict: Runtime Error):
import  collections 
N = int(input())
list_a = [input() for i in range(N)]
dict_a = collections.Counter(list_a)


list_ans = []

list_ans.append(dict_a.most_common()[0][0])
while True:
    if dict_a.most_common()[0][1] == dict_a.most_common()[i][1]:
        list_ans.append(dict_a.most_common()[i][0])
    else:
            break

list_ans.sort()
for i in range (0,len(list_ans)):
    print(list_ans[i])

Fixed submission:
N = int(input())
S = [input() for i in range(N)]
dictionary = {}
for word in S:
    if word in dictionary:
        dictionary[word] += 1
    else:
        dictionary[word] = 1

maximum = max(dictionary.values())
for key, value in sorted(dictionary.items()):
    if value == maximum:
        print(key)

Buggy python submission (verdict: Time Limit Exceeded):
import  collections 
N = int(input())
list_a = [input() for i in range(N)]
dict_a = collections.Counter(list_a)


list_ans = []

list_ans.append(dict_a.most_common()[0][0])
for i in range (1,len(dict_a)):
    if dict_a.most_common()[0][1] == dict_a.most_common()[i][1]:
        list_ans.append(dict_a.most_common()[i][0])

list_ans.sort()
for i in range (0,len(list_ans)):
    print(list_ans[i])

Fixed submission:
N = int(input())
S = [input() for i in range(N)]
dictionary = {}
for word in S:
    if word in dictionary:
        dictionary[word] += 1
    else:
        dictionary[word] = 1

maximum = max(dictionary.values())
for key, value in sorted(dictionary.items()):
    if value == maximum:
        print(key)

Buggy python submission (verdict: Time Limit Exceeded):
import  collections 
N = int(input())
list_a = []

for i in range (0,N):
    a = input()
    list_a.append(a)
dict_a = collections.Counter(list_a)


list_ans = []

list_ans.append(dict_a.most_common()[0][0])
for i in range (1,len(dict_a)):
    if dict_a.most_common()[0][1] == dict_a.most_common()[i][1]:
        list_ans.append(dict_a.most_common()[i][0])

list_ans.sort()
for i in range (0,len(list_ans)):
    print(list_ans[i])

Fixed submission:
N = int(input())
S = [input() for i in range(N)]
dictionary = {}
for word in S:
    if word in dictionary:
        dictionary[word] += 1
    else:
        dictionary[word] = 1

maximum = max(dictionary.values())
for key, value in sorted(dictionary.items()):
    if value == maximum:
        print(key)

Buggy python submission (verdict: Time Limit Exceeded):
import  collections 
N = int(input())
list_a = []

for i in range (0,N):
    a = input()
    list_a.append(a)
dict_a = collections.Counter(list_a)


list_ans = []

list_ans.append(dict_a.most_common()[0][0])
for i in range (1,len(dict_a)):
    if dict_a.most_common()[0][1] == dict_a.most_common()[i][1]:
        list_ans.append(dict_a.most_common()[i][0])

list_ans.sort()
for i in range (0,len(list_ans)):
    print(list_ans[i])

Fixed submission:
N = int(input())
S = [input() for i in range(N)]
dictionary = {}
for word in S:
    if word in dictionary:
        dictionary[word] += 1
    else:
        dictionary[word] = 1

maximum = max(dictionary.values())
for key, value in sorted(dictionary.items()):
    if value == maximum:
        print(key)