Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

poll = Counter(S)

ans = [k for k in poll.keys() if poll[k] == max(list(poll.values()))]
ans.sort()
for a in ans:
     print(a)

Fixed submission:
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

poll = Counter(S)
max_c = max(list(poll.values()))
ans = [k for k in poll.keys() if poll[k] == max_c]
ans.sort()
for a in ans:
     print(a)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

poll = dict(Counter(S))

ans = [k for k in poll.keys() if poll[k] == max(list(poll.values()))]
ans.sort()
for a in ans:
     print(a)

Fixed submission:
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

poll = Counter(S)
max_c = max(list(poll.values()))
ans = [k for k in poll.keys() if poll[k] == max_c]
ans.sort()
for a in ans:
     print(a)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

dictionary = dict(Counter(S))
ans = ["z" * 10] * n
i = 0
for k in dictionary.keys():
    if dictionary[k] == max(list(dictionary.values())):
        ans[i] = k
        i += 1

ans.sort()
for a in ans:
     if a == "z" * 10:
         break
     print(a)

Fixed submission:
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

poll = Counter(S)
max_c = max(list(poll.values()))
ans = [k for k in poll.keys() if poll[k] == max_c]
ans.sort()
for a in ans:
     print(a)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter, deque
n = int(input())
S = [input() for _ in range(n)]

dictionary = dict(Counter(S))
ans = [""] * n
i = 0
for k in dictionary.keys():
    if dictionary[k] == max(list(dictionary.values())):
        ans[i] = k
        i += 1

ans.sort()
for a in ans:
    if a == "":
        continue
    print(a)

Fixed submission:
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

poll = Counter(S)
max_c = max(list(poll.values()))
ans = [k for k in poll.keys() if poll[k] == max_c]
ans.sort()
for a in ans:
     print(a)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
N = int(input())
S = [input() for i in range(N)]
S = dict(Counter(S))
T = list(S.keys())
U = list(S.values())
U = [j for j, k in enumerate(U) if k == max(U)]
Ans = []
for u in U:
    Ans.append(T[u])
Ans = sorted(Ans)
for ans in Ans:
    print(ans)

Fixed submission:
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

poll = Counter(S)
max_c = max(list(poll.values()))
ans = [k for k in poll.keys() if poll[k] == max_c]
ans.sort()
for a in ans:
     print(a)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
N = int(input())
S = [input() for i in range(N)]
S = dict(Counter(S))
T = list(S.keys())
U = list(S.values())
U = [j for j, k in enumerate(U) if k == max(U)]
Ans = []
for u in U:
    Ans.append(T[u])
Ans = sorted(Ans)
for ans in Ans:
    print(ans)

Fixed submission:
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

poll = Counter(S)
max_c = max(list(poll.values()))
ans = [k for k in poll.keys() if poll[k] == max_c]
ans.sort()
for a in ans:
     print(a)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = sorted([input() for i in range(N)])
T = sorted(list(set(S)))
count = [0] * len(T)
for i in range(len(T)):
        count[i] = len([j for j, k in enumerate(S) if k == T[i]])
count_index = [k for k, l in enumerate(count) if l == max(count)]
for m in count_index:
    print(T[m])

Fixed submission:
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

poll = Counter(S)
max_c = max(list(poll.values()))
ans = [k for k in poll.keys() if poll[k] == max_c]
ans.sort()
for a in ans:
     print(a)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = sorted([input() for i in range(N)])
T = sorted(list(set(S)))
count = [0] * len(T)
for i in range(len(T)):
    for j in range(N):
        if T[i] == S[j]:
            count[i] += 1
count_index = [k for k, l in enumerate(count) if l == max(count)]
for m in count_index:
    print(T[m])

Fixed submission:
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

poll = Counter(S)
max_c = max(list(poll.values()))
ans = [k for k in poll.keys() if poll[k] == max_c]
ans.sort()
for a in ans:
     print(a)