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

l = [0] * n
for i in range(n):
    l[i] = input()

k = set(l)
m = 0
ans = []

for i in k:
    cnt = l.count(i)
    if cnt > m:
        m = cnt
        del ans[:]
        ans.append(i)
    elif cnt == m:
        ans.append(i)

ans.sort()

print(*ans, sep="\n", end="")

Fixed submission:
n = int(input())

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []
th = max(words.values())

for i,j in words.items():
    if th == j:
        l.append(i)

l.sort()

print(*l, sep="\n", end="")

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

l = [0] * n
for i in range(n):
    l[i] = input()

k = set(l)
m = 0
ans = []

for i in k:
    cnt = l.count(i)
    if cnt > m:
        m = cnt
        ans.clear()
        ans.append(i)
    elif cnt == m:
        ans.append(i)

ans.sort()

for i in ans:
    print(i)

Fixed submission:
n = int(input())

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []
th = max(words.values())

for i,j in words.items():
    if th == j:
        l.append(i)

l.sort()

print(*l, sep="\n", end="")

Buggy python submission (verdict: Runtime Error):
n = int(input())

l = [0] * n
for i in range(n):
    l[i] = input()

k = set(l)
m = 0
ans = []

for i in k:
    cnt = l.count(i)
    if cnt > m:
        m = cnt
        ans.clear()
        ans.append(i)
    elif cnt == m:
        ans.append(i)

ans.sort()

for i in ans:
    print(i)

Fixed submission:
n = int(input())

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []
th = max(words.values())

for i,j in words.items():
    if th == j:
        l.append(i)

l.sort()

print(*l, sep="\n", end="")

Buggy python submission (verdict: Runtime Error):
n = int(input())

l = [0] * n
for i in range(n):
    l[i] = input()

k = set(l)
m = 0
ans = []

for i in k:
    cnt = l.count(i)
    if cnt > m:
        m = cnt
        ans.clear()
        ans.append(i)
    elif cnt == m:
        ans.append(i)

ans.sort()

print(*ans, sep="\n", end="")

Fixed submission:
n = int(input())

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []
th = max(words.values())

for i,j in words.items():
    if th == j:
        l.append(i)

l.sort()

print(*l, sep="\n", end="")

Buggy python submission (verdict: Runtime Error):
n = int(input())

l = [0] * n
for i in range(n):
    l[i] = input()

k = set(l)
m = 0
ans = []

for i in k:
    cnt = l.count(i)
    if cnt > m:
        m = cnt
        ans.clear()
        ans.append(i)
    elif cnt == m:
        ans.append(i)

ans.sort()

print(*ans, sep="\n")

Fixed submission:
n = int(input())

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []
th = max(words.values())

for i,j in words.items():
    if th == j:
        l.append(i)

l.sort()

print(*l, sep="\n", end="")

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

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []

for i,j in words.items():
    if max(words.values()) == j:
        l.append(i)
        
l.sort()

print(*l, sep="\n")

Fixed submission:
n = int(input())

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []
th = max(words.values())

for i,j in words.items():
    if th == j:
        l.append(i)

l.sort()

print(*l, sep="\n", end="")

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

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []

for i,j in words.items():
    if max(words.values()) == j:
        l.append(i)
l.sort()
for i in l:
    print(i)

Fixed submission:
n = int(input())

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []
th = max(words.values())

for i,j in words.items():
    if th == j:
        l.append(i)

l.sort()

print(*l, sep="\n", end="")

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

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

swords = sorted(words.items())

for i in swords:
    if max(words.values()) == i[1]:
        print(i[0])

Fixed submission:
n = int(input())

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []
th = max(words.values())

for i,j in words.items():
    if th == j:
        l.append(i)

l.sort()

print(*l, sep="\n", end="")