Buggy python submission (verdict: Runtime Error):
mountain, answer = [], []

while(True):
  input = raw_input().split()
  if input[0] == 'push':
    mountain.insert(int(input[1]), input[2])
  elif input[0] == 'pop':
    answers.append(input[1])
    mountain.pop(input[1])
  elif input[0] == 'move':
    mountain[1], mountain[2] = mountain[2], mountain[1]
  elif input[0] == 'quit':
    break

for answer in answers:
  print answer

Fixed submission:
n = input()
stack = [[] for i in range(n)]
while(True):
    s = raw_input().split()
    if(s[0] == "quit"):
        break
    if(s[0] == "push"):
        stack[int(s[1]) - 1].append(s[2])
    elif(s[0] == "pop"):
        print(stack[int(s[1]) - 1].pop())
    elif(s[0] == "move"):
        stack[int(s[2]) - 1].append(stack[int(s[1]) - 1].pop())

Buggy python submission (verdict: Runtime Error):
mountain, answer = [], []

while(True):
  input = raw_input().split()
  if input[0] == 'push':
    mountain.insert(int(input[1]), input[2])
  elif input[0] == 'pop':
    answers.append(input[1])
    mountain.pop(input[1])
  elif input[0] == 'move':
    move_item = mountain[int(input[1])]
    mountain.pop(input[1])
    mountain.insert(input[2], move_item)
  elif input[0] == 'quit':
    break

for answer in answers:
  print answer

Fixed submission:
n = input()
stack = [[] for i in range(n)]
while(True):
    s = raw_input().split()
    if(s[0] == "quit"):
        break
    if(s[0] == "push"):
        stack[int(s[1]) - 1].append(s[2])
    elif(s[0] == "pop"):
        print(stack[int(s[1]) - 1].pop())
    elif(s[0] == "move"):
        stack[int(s[2]) - 1].append(stack[int(s[1]) - 1].pop())

Buggy python submission (verdict: Runtime Error):
mountain, answer = [], []

while(True):
  input = raw_input().split()
  if input[0] == 'push':
    mountain.insert(int(input[1]), input[2])
  elif input[0] == 'pop':
    answers.append(input[1])
    mountain.pop(input[1])
  elif input[0] == 'move':
    move_item = mountain[int(input[1])]
    mountain.pop(input[1])
    mountain.insert(int(input[2]), move_item)
  elif input[0] == 'quit':
    break

for answer in answers:
  print answer

Fixed submission:
n = input()
stack = [[] for i in range(n)]
while(True):
    s = raw_input().split()
    if(s[0] == "quit"):
        break
    if(s[0] == "push"):
        stack[int(s[1]) - 1].append(s[2])
    elif(s[0] == "pop"):
        print(stack[int(s[1]) - 1].pop())
    elif(s[0] == "move"):
        stack[int(s[2]) - 1].append(stack[int(s[1]) - 1].pop())

Buggy python submission (verdict: Runtime Error):
mountain, answers = [], []

while(True):
  input = raw_input().split()
  if input[0] == 'push':
    mountain.insert(int(input[1]), input[2])
  elif input[0] == 'pop':
    answers.append(mountain[int(input[1])])
    mountain.pop(int(input[1]))
  elif input[0] == 'move':
    move_item = mountain[int(input[1])]
    mountain.pop(int(input[1]))
    mountain.insert(int(input[2]), move_item)
  elif input[0] == 'quit':
    break

for answer in answers:
  print answer

Fixed submission:
n = input()
stack = [[] for i in range(n)]
while(True):
    s = raw_input().split()
    if(s[0] == "quit"):
        break
    if(s[0] == "push"):
        stack[int(s[1]) - 1].append(s[2])
    elif(s[0] == "pop"):
        print(stack[int(s[1]) - 1].pop())
    elif(s[0] == "move"):
        stack[int(s[2]) - 1].append(stack[int(s[1]) - 1].pop())

Buggy python submission (verdict: Runtime Error):
mountain, answers = [], []
input = input()
while(True):
  input = raw_input().split()
  if input[0] == 'push':
    mountain.insert(int(input[1]), input[2])
  elif input[0] == 'pop':
    answers.append(mountain[int(input[1])])
    mountain.pop(int(input[1]))
  elif input[0] == 'move':
    move_item = mountain[int(input[1])]
    mountain.pop(int(input[1]))
    mountain.insert(int(input[2]), move_item)
  elif input[0] == 'quit':
    break

for answer in answers:
  print answer

Fixed submission:
n = input()
stack = [[] for i in range(n)]
while(True):
    s = raw_input().split()
    if(s[0] == "quit"):
        break
    if(s[0] == "push"):
        stack[int(s[1]) - 1].append(s[2])
    elif(s[0] == "pop"):
        print(stack[int(s[1]) - 1].pop())
    elif(s[0] == "move"):
        stack[int(s[2]) - 1].append(stack[int(s[1]) - 1].pop())