Buggy python submission (verdict: Time Limit Exceeded):
# coding cell (SUBMIT ONLY THIS CELL)

N = int(input())

counter = []
num = []

for i in range(N):
    temp = input()
    if temp in counter:
        num[counter.index(temp)] += 1
    else:
        counter.append(temp)
        num.append(1)

m = max(num)

joined = []
for i in range(len(num)):
    joined.append([-1 * num[i], counter[i]])

joined.sort()

for i in range(len(num)):
    if joined[i][0] == -1 * m:
        print(joined[i][1])
    else:
        break

Fixed submission:
# coding cell (SUBMIT ONLY THIS CELL)

N = int(input())

counter = {}

for i in range(N):
    temp = input()
    if temp not in counter:
        counter.update({temp : 1})
    else:
        counter.update({temp : counter[temp] + 1})

m = max(counter.values())
        
ans = []    

for a,b in counter.items():
    if b == m:
        ans.append(a)
    
ans.sort()

for i in ans:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

line_list = []
line_num = []

for i in range(N):
    temp = input()
    if temp in line_list:
        line_num[line_list.index(temp)] += 1
    else:
        line_list.append(temp)
        line_num.append(1)
        
maxs = []

for i in range(len(line_list)):
    if line_num[i] == max(line_num):
        maxs.append(line_list[i])
        
maxs.sort()
for i in range(len(maxs)):
    print(maxs[i])

Fixed submission:
# coding cell (SUBMIT ONLY THIS CELL)

N = int(input())

counter = {}

for i in range(N):
    temp = input()
    if temp not in counter:
        counter.update({temp : 1})
    else:
        counter.update({temp : counter[temp] + 1})

m = max(counter.values())
        
ans = []    

for a,b in counter.items():
    if b == m:
        ans.append(a)
    
ans.sort()

for i in ans:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

name = []
num = []

max_temp = 1

for _ in range(N):
    temp = input()
    if not temp in name:
        name.append(temp)
        num.append(1)
    else:
        x = name.index(temp)
        num[x] += 1
        if num[x] > max_temp:
            max_temp = num[x]
            
        
output = []

for i in range(len(num)):
    if num[i] == max_temp:
        output.append(name[i])
        
output.sort()

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

Fixed submission:
# coding cell (SUBMIT ONLY THIS CELL)

N = int(input())

counter = {}

for i in range(N):
    temp = input()
    if temp not in counter:
        counter.update({temp : 1})
    else:
        counter.update({temp : counter[temp] + 1})

m = max(counter.values())
        
ans = []    

for a,b in counter.items():
    if b == m:
        ans.append(a)
    
ans.sort()

for i in ans:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

name = []
num = []

max_temp = 1

for _ in range(N):
    temp = input()
    if not temp in name:
        name.append(temp)
        num.append(1)
    else:
        num[name.index(temp)] += 1
        if num[name.index(temp)] > max_temp:
            max_temp = num[name.index(temp)]
            
        
output = []

for i in range(len(num)):
    if num[i] == max_temp:
        output.append(name[i])
        
output.sort()

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

Fixed submission:
# coding cell (SUBMIT ONLY THIS CELL)

N = int(input())

counter = {}

for i in range(N):
    temp = input()
    if temp not in counter:
        counter.update({temp : 1})
    else:
        counter.update({temp : counter[temp] + 1})

m = max(counter.values())
        
ans = []    

for a,b in counter.items():
    if b == m:
        ans.append(a)
    
ans.sort()

for i in ans:
    print(i)