Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]

d = {}
for i in range(n):
  if s[i] in d.keys():
    d[s[i]] += 1
  else:
    d[s[i]] = 1

m = max(d.values())

ans = [k for k, v in d.items() if v == m]

for i in sorted(ans):
  print(i)

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]

d = {}
for i in range(n):
  if s[i] in d.keys():
    d[s[i]] += 1
  else:
    d[s[i]] = 1

m = max(d.values())

ans = [k for k, v in d.items() if v == m]
ans.sort()

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

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]

d = {}
for i in range(n):
  if s[i] in d.keys():
    d[s[i]] += 1
  else:
    d[s[i]] = 1

m = max(d.values())

ans = [k for k, v in d.items() if v == m]
ans.sort()

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

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

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

d = {}
for i in range(n):
  s = input()
  if s in d.keys():
    d[s] += 1
  else:
    d[s] = 1

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

for k, v in d.items():
  if v == m:
    ans.append(k)
ans.sort()
print(*ans, sep = "\n")

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]

d = {}
for i in range(n):
  if s[i] in d.keys():
    d[s[i]] += 1
  else:
    d[s[i]] = 1

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

for k, v in d.items():
  if v == m:
    ans.append(k)
ans.sort()
print(*ans, sep = "\n")

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]

l = []
l_num = []
for i in range(n):
  a = [s[i], s.count(s[i])]
  if a not in l:
    l.append(a)
    l_num.append(s.count(s[i]))

max_num = max(l_num)
l.sort()

for i in range(len(l)):
  if l[i][1] == max_num:
    print(l[i][0])

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]

l = []
list_num = []
for i in range(n):
  l.append([s[i], s.count(s[i])])
  list_num.append(s.count(s[i]))

max_num = max(list_num)

se = set()
for i in range(n):
  if l[i][1] == max_num:
    se.add(l[i][0])
l_2 =list(se)
l_2.sort()

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

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]

l = []
list_num = []
for i in range(n):
  l.append([s[i], s.count(s[i])])
  list_num.append(s.count(s[i]))

max_num = max(list_num)

se = set()
for i in range(n):
  if l[i][1] == max_num:
    se.add(l[i][0])
l_2 =list(se)
l_2.sort()

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

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
ans_number = c.most_common()[0][1]

s_max = []
for i in range(len(c)):
  if c.most_common()[i][1] == ans_number:
    s_max.append(c.most_common()[i][0])
  else:
    break;

s_max.sort()
for a in s_max:
  print(a)


Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
ans_number = c.most_common()[0][1]

s_max = []
for i in range(len(c)):
  if c.most_common()[i][1] == ans_number:
    s_max.append(c.most_common()[i][0])
  else:
    break;

s_max.sort()
for a in s_max:
  print(a)

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
ans_number = c.most_common()[0][1]
    
s_max = []
for i in range(n):
  if s.count(s[i]) == ans_number:
    s_max.append(s[i])
    
s_max = list(set(s_max))
s_max.sort()
for i in range(len(s_max)):
  print(s_max[i])


Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
ans_number = c.most_common()[0][1]
    
s_max = []
for i in range(n):
  if s.count(s[i]) == ans_number:
    s_max.append(s[i])
    
s_max = list(set(s_max))
s_max.sort()
for i in range(len(s_max)):
  print(s_max[i])

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]
ans_number = 0

for i in range(n):
  if ans_number < s.count(s[i]):
    ans_number = s.count(s[i])
    
s_max = []
for i in range(n):
  if s.count(s[i]) == ans_number:
    s_max.append(s[i])
    
s_max = list(set(s_max))
s_max.sort()
for i in range(len(s_max)):
  print(s_max[i])

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])