Buggy python submission (verdict: Runtime Error):
length = raw_input()
count = length
answer = raw_input()


def compare(current, previous, i):
  if current[0] < previous[0]:
    answer = current
  elif current[0] == previous[0]:
    compare(current, previous, i+1)

while count > 0:
  if count == length:
    current_word = answer
  if count < length:
    previous_word = current_word
    current_word = raw_input()
    min_length = min([len(current_word), len(previous_word)])
    compare(current_word, previous_word, 0)
  count -= 1

print answer
  

Fixed submission:
s = []
n = input()
 
for i in range(n):
    x = raw_input()
    s.append(x)
 
s.sort()
 
print s[0]

Buggy python submission (verdict: Runtime Error):
length = raw_input()
count = length
answer = raw_input()


def compare(current, previous, i):
  if current[i] < previous[i]:
    answer = current
  elif current[i] == previous[i]:
    compare(current, previous, i+1)

while count > 0:
  if count == length:
    current_word = answer
  if count < length:
    previous_word = current_word
    current_word = raw_input()
    min_length = min([len(current_word), len(previous_word)])
    compare(current_word, previous_word, 0)
  count -= 1

print answer
  

Fixed submission:
s = []
n = input()
 
for i in range(n):
    x = raw_input()
    s.append(x)
 
s.sort()
 
print s[0]

Buggy python submission (verdict: Runtime Error):
length = raw_input()
count = length
answer = raw_input()


def compare(current, i):
  if current[i] < previous[i]:
    answer = current
  elif current[i] == previous[i]:
    compare(current, i+1)

while count > 0:
  if count == length:
    current_word = answer
  if count < length:
    current_word = raw_input()
    compare(current_word, 0)
  count -= 1

print answer
  

Fixed submission:
s = []
n = input()
 
for i in range(n):
    x = raw_input()
    s.append(x)
 
s.sort()
 
print s[0]

Buggy python submission (verdict: Runtime Error):
length = raw_input()
count = length
answer = raw_input()


def compare(current, i):
  if current[i] < answer[i]:
    answer = current
  elif current[i] == answer[i]:
    compare(current, i+1)

while count > 0:
  if count == length:
    current_word = answer
  if count < length:
    current_word = raw_input()
    compare(current_word, 0)
  count -= 1

print answer
  

Fixed submission:
s = []
n = input()
 
for i in range(n):
    x = raw_input()
    s.append(x)
 
s.sort()
 
print s[0]

Buggy python submission (verdict: Runtime Error):
length = raw_input()
count = length
answer = raw_input()

def compare(current, i):
  if current[i] < answer[i]:
    answer = current
  elif current[i] == answer[i]:
    compare(current, i+1)

while count > 0:
  if count < length:
    current_word = raw_input()
    compare(current_word, 0)
  count -= 1

print answer
  

Fixed submission:
s = []
n = input()
 
for i in range(n):
    x = raw_input()
    s.append(x)
 
s.sort()
 
print s[0]

Buggy python submission (verdict: Runtime Error):
length = raw_input()
count = length
answer = raw_input()

def compare(current, i):
  if current[i] < answer[i]:
    answer = current
  elif current[i] == answer[i]:
    compare(current, i+1)

while count > 0:
  current_word = raw_input()
  compare(current_word, 0)
  count -= 1

print answer
  

Fixed submission:
s = []
n = input()
 
for i in range(n):
    x = raw_input()
    s.append(x)
 
s.sort()
 
print s[0]

Buggy python submission (verdict: Runtime Error):
length = int(raw_input())
count = length
answer = raw_input()

def compare(current, i):
  if current[i] < answer[i]:
    answer = current
  elif current[i] == answer[i]:
    compare(current, i+1)

while count > 0:
  current_word = raw_input()
  compare(current_word, 0)
  count -= 1

print answer
  

Fixed submission:
s = []
n = input()
 
for i in range(n):
    x = raw_input()
    s.append(x)
 
s.sort()
 
print s[0]