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

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = int(x.split(" "))

for i in range(1, y):
  if i > 0:
    j = i - 1
    if list(i) < list(j):
      list(i),  list(j) = list(j), list(i)
      i = i - 2

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)

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

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = int(x.split(" "))

for i in range(1, y + 1):
  if list(i) < list(i - 1):
    for j range(i - 1, 0):
      if list(j) < list(i):
        list(i),  list(j+1) = list(j+1), list(i)
        break
  for k in range(0, y):
    print list(j)

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)

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

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = int(x.split(" "))

for i in range(1, y + 1):
  if list(i) < list(i - 1):
    for j range(i - 1, 0):
      if list(j) < list(i):
        list(i),  list(j+1) = list(j+1), list(i)
        break
  for k in range(0, y):
    print list(k)

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)

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

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = int(x.split(" "))

for i in range(1, y + 1):
  if list(i) < list(i - 1):
    for j range(i - 1, 0):
      if list(j) < list(i):
        list(i),  list(j+1) = list(j+1), list(i)
        break
  for k in range(0, y):
    print list(k)

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)

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

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = int(x.split(" "))

for i in range(1, y):
  if list(i) < list(i - 1):
    for j range(i - 1, -1):
      if list(j) < list(i):
        list(i),  list(j+1) = list(j+1), list(i)
        break
  for k in range(0, y):
    print list(k)

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)

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

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = int(x.split(" "))

for i in range(1, y):
  if x_list[i] < x_list[i - 1]:
    for j range(i - 1, -1):
      if x_list[j] < x_list[i]:
        x_list[i],  x_list[j+1] = x_list[j+1], x_list[i]
        break
  for k in range(0, y):
    print x_list[k]

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)

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

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for i in range(1, y):
  if x_list[i] < x_list[i - 1]:
    for j in range(0, i - 1):
      if x_list[j] > x_list[i]:
        temp = x_list[i]
        for p in range(0, i):
          q = i - p
          x_list[q] = x_list[q - 1]
        x_list[j+1] = temp
      elif x_list[0] > x_list[i]
        for p in range(0, i):
          q = i - p
          temp = x_list[i]
          x_list[q] = x_list[q - 1]
        x_list[0] = temp
  for k in range(0, y):
    print x_list[k],
  print " "

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)

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

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for i in range(1, y):
  if x_list[i] < x_list[i - 1]:
    for j in range(0, i - 1):
      if x_list[j] > x_list[i]:
        temp = x_list[i]
        for p in range(0, i):
          q = i - p
          x_list[q] = x_list[q - 1]
        x_list[j+1] = temp
      elif x_list[0] > x_list[i]
        for p in range(0, i):
          q = i - p
          temp = x_list[i]
          x_list[q] = x_list[q - 1]
        x_list[0] = temp
  for k in range(0, y):
    print x_list[k],
  print " "

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)

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

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for i in range(1, y):
  if x_list[i] < x_list[i - 1]:
    for j in range(0, i - 1):
      
      if x_list[0] > x_list[i]
        for p in range(0, i):
          q = i - p
          temp = x_list[i]
          x_list[q] = x_list[q - 1]
        x_list[0] = temp
      elif x_list[j] > x_list[i]:
        temp = x_list[i]
        for p in range(0, i):
          q = i - p
          x_list[q] = x_list[q - 1]
        x_list[j+1] = temp
  for k in range(0, y):
    print x_list[k],
  print " "

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)

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

def inserttionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j--
    x_list[j+1] = v
  for k in range(0, y):
    print x_list[k],
  print " "



y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for i in range(1, y):

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)

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

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j--
    x_list[j+1] = v
  for k in range(0, y):
    print x_list[k],
  print " "



y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

insertionSort(x_list, y)

Fixed submission:
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)