Buggy python submission (verdict: Runtime Error):
import collections

N = int(input())
s = [input() for i in range(N)]

c = collections.Counter(s)
max_num = list(c.values())[0]
d = []
for key,value in c:
  if value == max_num:
    d.append(key)
  else:
    break
    
for i in sorted(d):
  print(i)
  



Fixed submission:
import collections

N = int(input())
s = [input() for i in range(N)]

c = collections.Counter(s)
max_num = max(c.values())
d = []
for key,value in c.items():
  if value == max_num:
    d.append(key)

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

Buggy python submission (verdict: Runtime Error):
import collections

N = int(input())
s = list(input().split())

c = collections.Counter(s)
max_num = list(c.values())[0]
d = []
for key,value in c:
  if value == max_num:
    d.append(key)
  else:
    break
    
for i in sorted(d):
  print(i)
  



Fixed submission:
import collections

N = int(input())
s = [input() for i in range(N)]

c = collections.Counter(s)
max_num = max(c.values())
d = []
for key,value in c.items():
  if value == max_num:
    d.append(key)

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

Buggy python submission (verdict: Runtime Error):
import collections

N = int(input())
s = list(map(int, input().split()))

c = collections.Counter(s)
max_num = list(c.values())[0]
d = []
for key,value in c.items():
  if value == max_num:
    d.append(key)
  else:
    break
    
for i in sorted(d):
  print(i)
  



Fixed submission:
import collections

N = int(input())
s = [input() for i in range(N)]

c = collections.Counter(s)
max_num = max(c.values())
d = []
for key,value in c.items():
  if value == max_num:
    d.append(key)

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

Buggy python submission (verdict: Runtime Error):
import collections

N = int(input())
s = list(map(int, input().split()))

c = collections.Counter(s)
max_num = list(c.values())[0]
d = []
for key,value in c:
  if value == max_num:
    d.append(key)
  else:
    break
    
for i in sorted(d):
  print(i)
  



Fixed submission:
import collections

N = int(input())
s = [input() for i in range(N)]

c = collections.Counter(s)
max_num = max(c.values())
d = []
for key,value in c.items():
  if value == max_num:
    d.append(key)

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

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

words = list(set(s))
max_num = 0
t = []
for word in words:
    count = s.count(word)

    if count > max_num:
        max_num = count
        t = [word]
    elif count == max_num:
        t.append(word)

t = sorted(t)
for i in t:
  print(i)


Fixed submission:
import collections

N = int(input())
s = [input() for i in range(N)]

c = collections.Counter(s)
max_num = max(c.values())
d = []
for key,value in c.items():
  if value == max_num:
    d.append(key)

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

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

n = N
max_num = 0
t = []
while n >= max_num:
    word = s[0]
    count = s.count(s[0])

    if count > max_num:
        max_num = count
        t = [s[0]]
    elif count == max_num:
        t.append(s[0])

    for i in range(count):
        s.remove(word)
    n = len(s)

t = sorted(t)
for i in t:
  print(i)


Fixed submission:
import collections

N = int(input())
s = [input() for i in range(N)]

c = collections.Counter(s)
max_num = max(c.values())
d = []
for key,value in c.items():
  if value == max_num:
    d.append(key)

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

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

n = N
max_num = 0
t = []
while n >= max_num:
    word = s[0]
    count = 0
    for i in s:
        if i == word:
            count += 1

    if count > max_num:
        max_num = count
        t = [s[0]]
    elif count == max_num:
        t.append(s[0])

    s = [i for i in s if i != word]
    n = len(s)

t = sorted(t)
for i in t:
  print(i)


Fixed submission:
import collections

N = int(input())
s = [input() for i in range(N)]

c = collections.Counter(s)
max_num = max(c.values())
d = []
for key,value in c.items():
  if value == max_num:
    d.append(key)

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

Buggy python submission (verdict: Runtime Error):
N = int(input())
s = [input() for i in range(N)]

n = N
max_num = 0
t = []
while n >= max_num:
    word = s[0]
	count = 0
    for i in s:
      if i == word:
        count += 1
        
    if count > max_num:
      max_num = count
      t = [s[0]]
    elif count == max_num:
      t = t.append(s[0])
      
    s = [i for i in s if i != word]
    n = len(s)

t = sorted(t)
for i in range(t):
  print(i)

Fixed submission:
import collections

N = int(input())
s = [input() for i in range(N)]

c = collections.Counter(s)
max_num = max(c.values())
d = []
for key,value in c.items():
  if value == max_num:
    d.append(key)

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