Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s=input()
print s[::-1]

Fixed submission:
import sys
s=sys.stdin.readline().rstrip()
print s[::-1]
Buggy python submission (verdict: Runtime Error):
'''
Created on Mar 22, 2013

@author: wukc
'''

from sys import stdin

a=map(int,stdin.readline().split())
a.sort()
print(" ".join(a[::-1]))

Fixed submission:
'''
Created on Mar 22, 2013

@author: wukc
'''

from sys import stdin

a=map(int,stdin.readline().split())
a.sort()
print(" ".join(map(str,a[::-1])))
Buggy python submission (verdict: Runtime Error):
'''
Created on Mar 22, 2013

@author: wukc
'''

from numpy import product
from sys import stdin

n=int(stdin.readline())
print(product(range(1,n+1)))

Fixed submission:
'''
Created on Mar 22, 2013

@author: wukc
'''
from sys import stdin

n=int(stdin.readline())
ans=1
for i in range(1,n+1):
    ans*=i
print(ans)
Buggy python submission (verdict: Runtime Error):
garage = []
while True:
    num = int(input())
    if num == 0:
        print(garage.pop())
    else:
        garage.append(num)

Fixed submission:
garage = []
while True:
    try:
        car = int(input())
    except:
        break
    if car == 0:
        print(garage.pop())
    else:
        garage.append(car)
Buggy python submission (verdict: Time Limit Exceeded):
def take(n, iterable):
    start, end = 0, n
    while True:
        chunk = iterable[start:end]
        if len(chunk) < n:
            raise StopIteration()
        yield chunk
        start += 1
        end += 1
while True:
    num = int(input())
    if not num: break
    data = [int(input()) for _ in range(num)]
    print(max((sum(chunk) for i in range(1,num+1) for chunk in take(i, data))))

Fixed submission:
while True:
    num = int(input())
    if not num: break
    result, tmp = -1e6, 0
    for _ in range(num):
        new = int(input())
        tmp = max(new, new+tmp)
        result = max(tmp, result)
    print(result)
Buggy python submission (verdict: Runtime Error):
from operator import itemgetter
from collections import OrderedDict
n, q = [int(el) for el in input().split(' ')]
data = OrderedDict({i:0 for i in range(n,0,-1)})
for _ in range(q):
    a, v = [int(el) for el in input().split(' ')]
    data[a] += v
    print(*max(data.items(), key=itemgetter(1)))

Fixed submission:
n = int(input())
data = [0] * n
for _ in range(n):
    a, v = [int(el) for el in input().split()]
    data[a-1] += v
result = max(data)
print(data.index(result)+1, result)

Buggy python submission (verdict: Runtime Error):
from operator import itemgetter
from collections import OrderedDict
n = int(input())
data = OrderedDict({i:0 for i in range(n,0,-1)})
for _ in range(n):
    a, v = [int(el) for el in input().split(' ')]
    data[a] += v
print(*max(data.items(), key=itemgetter(1)))

Fixed submission:
n = int(input())
data = [0] * n
for _ in range(n):
    a, v = [int(el) for el in input().split()]
    data[a-1] += v
result = max(data)
print(data.index(result)+1, result)

Buggy python submission (verdict: Runtime Error):
n = int(input())
data = [0] * n
for _ in range(n):
    a, v = [int(el) for el in input().split(' ')]
    data[a-1] += v
result = max(data)
print(data.index(result)+1, result)

Fixed submission:
n = int(input())
data = [0] * n
for _ in range(n):
    a, v = [int(el) for el in input().split()]
    data[a-1] += v
result = max(data)
print(data.index(result)+1, result)
Buggy python submission (verdict: Runtime Error):
while True:
    num = int(input())
    if not num:
        break
    data = [input() for _ in range(num)]
    [print(el.replace('Hoshino', 'Hoshina')) for el in data]

Fixed submission:
[print(input().replace('Hoshino', 'Hoshina')) for _ in range(int(input()))]

Buggy python submission (verdict: Runtime Error):
while True:
    num = int(input())
    if not num:
        break
    data = [input() for _ in range(num)]
    [print(el.replace('Hoshino', 'Hoshina')) for el in data]

Fixed submission:
[print(input().replace('Hoshino', 'Hoshina')) for _ in range(int(input()))]

Buggy python submission (verdict: Runtime Error):
while True:
    num = int(input())
    if not num:
        break
    data = [input() for _ in range(num)]
    [print(el.replace('Hoshino', 'Hoshina')) for el in data]

Fixed submission:
[print(input().replace('Hoshino', 'Hoshina')) for _ in range(int(input()))]

Buggy python submission (verdict: Runtime Error):
while True:
    num = int(raw_input())
    if not num:
        break
    data = [raw_input() for _ in range(num)]
    for el in data:
        print(el.replace('Hoshino', 'Hoshina'))

Fixed submission:
[print(input().replace('Hoshino', 'Hoshina')) for _ in range(int(input()))]

Buggy python submission (verdict: Runtime Error):
[print(input().replace('Hoshino', 'Hoshina')) for _ in range(int(inpu()))]

Fixed submission:
[print(input().replace('Hoshino', 'Hoshina')) for _ in range(int(input()))]
Buggy python submission (verdict: Runtime Error):
w, h, x, y, r= map(int, raw_input().split())
if (w - r => x => r) and (h - r => y => r):
	print 'YES'
else:
	print 'NO'

Fixed submission:
w, h, x, y, r= map(int, raw_input().split())
if (r <= x <= w-r) and (r <= y <= h - r):
	print 'Yes'
else:
	print 'No'

Buggy python submission (verdict: Runtime Error):
w, h, x, y, r= map(int, raw_input().split())
if (w - r => x => r) and (h - r => y => r):
	print 'Yes'
else:
	print 'No'

Fixed submission:
w, h, x, y, r= map(int, raw_input().split())
if (r <= x <= w-r) and (r <= y <= h - r):
	print 'Yes'
else:
	print 'No'
Buggy python submission (verdict: Runtime Error):
q = input()
ans_s = q % 60
ans_m = ((q - ans_s)/60) % 60
ans_h = ((q - ans_s)/60 - ans_m) / 60
print(ans_h & ":" & ans_m & ":" & ans_s)

Fixed submission:
q = input()
ans_s = q % 60
ans_m = ((q - ans_s)/60) % 60
ans_h = ((q - ans_s)/60 - ans_m) / 60
print("%d:%d:%d" % (ans_h,ans_m,ans_s))
Buggy python submission (verdict: Runtime Error):
W, H, x, y, r = (int(i) for i in input().split())
 
if x - r < 0 or x + r > W or y - r < 0 or y + r > H:
  print "No"
else:
  print "Yes"

Fixed submission:
W, H, x, y, r = (int(i) for i in input().split())
 
if x - r < 0 :
    print("No")
elif x + r > W:
    print("No")
elif  y - r < 0:
    print("No")
elif y + r > H:
  print ("No")
else:
  print ("Yes")
Buggy python submission (verdict: Runtime Error):
import sys

num = 0

while 1:
 x = sys.stdin.readline().strip()
 if x == "0":
  break
 
 num = num + 1
 
 print("case " + str(num) + ": " + x")
 

Fixed submission:
import sys
num = 0
while 1:
    x = sys.stdin.readline().strip()
    if x == "0":
        break
    num = num + 1
    print("Case " + str(num) + ": " + x)

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

num = 0

while check == True:
 x = sys.stdin.readline().strip()
 if x == "0":
  check = False
 
 num = num + 1
 
 print("case " + str(num) + ": " + x")
 

Fixed submission:
import sys
num = 0
while 1:
    x = sys.stdin.readline().strip()
    if x == "0":
        break
    num = num + 1
    print("Case " + str(num) + ": " + x)

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

check = True
i = 0
#for j in range(100):

#	x = sys.stdin.readline().strip()
#	
#	if x == "0":
#		check = False
#		break
	
	print("Case " + str(i) + ": " + x)

Fixed submission:
import sys
num = 0
while 1:
    x = sys.stdin.readline().strip()
    if x == "0":
        break
    num = num + 1
    print("Case " + str(num) + ": " + x)
Buggy python submission (verdict: Runtime Error):
import math
x = int(input())
print(x * 2 * math.pi, x ** 2 * math.pi)

Fixed submission:
import math
x = float(input())
print (x ** 2 * math.pi, x * 2 * math.pi)
Buggy python submission (verdict: Runtime Error):
import sys

heights = []
for line in sys.stdin:
    heights.append(int(line.strip())

for height in sorted(heights, reverse=True)[:3]:
    print height

sys.exit(0)

Fixed submission:
import sys
import fileinput

def main():
    for height in sorted(map(lambda x: int(x), fileinput.input()), reverse = True)[:3]:
        print height
    return 0

if __name__ == "__main__":
    sys.exit(main())
Buggy python submission (verdict: Runtime Error):
def datesOfTheYear(year):
    if year % 3 == 0:
        return 200
    return 195


def datesOfTheMonth(year, month):
    if year % 3 == 0:
        return 20
    if month % 2 == 0:
        return 19
    else:
        return  20


def datesFromBorn(birthyear, birthmonth, birthdate):
    result = 0
    for y in range(birthyear + 1, 1000):
        result += datesOfTheYear(y)
    for m in range(birthmonth + 1, 11):
        result += datesOfTheMonth(birthyear, m)
    result += datesOfTheMonth(birthyear, birthmonth) - birthdate + 1
    return result                                                 


if __name__ == "__main__":
    import sys
    import fileinput

    fin = fileinput.input()
    numberofcandidate = int(fin.next().sprit())

    for _ in range(numberofcandidate):
        year, month, date = fin.next().strip().split()
        print datesFromBorn(year, month, date)

    sys.exit(0)

Fixed submission:
def datesOfTheYear(year):
    if year % 3 == 0:
        return 200
    return 195


def datesOfTheMonth(year, month):
    if year % 3 == 0:
        return 20
    if month % 2 == 0:
        return 19
    else:
        return  20


def datesFromBorn(birthyear, birthmonth, birthdate):
    result = 0
    for y in range(birthyear + 1, 1000):
        result += datesOfTheYear(y)
    for m in range(birthmonth + 1, 11):
        result += datesOfTheMonth(birthyear, m)
    result += datesOfTheMonth(birthyear, birthmonth) - birthdate + 1
    return result

if __name__ == "__main__":
    import sys
    import fileinput

    fin = fileinput.input()
    numberofcandidate = int(fin.next().strip())

    for _ in range(numberofcandidate):
        year, month, date = [int(i) for i in fin.next().strip().split()]
        print datesFromBorn(year, month, date)

    sys.exit(0)
Buggy python submission (verdict: Runtime Error):
import fileinput

a, b = [int(i) for i in fileinput.input().next().strip().split()]
if a > b:
	print "a > b"
elif a < b:
	print "a < b"
else:
	print "a == b

Fixed submission:
import fileinput
import sys

a, b = [int(i) for i in fileinput.input().next().strip().split()]
if a > b:
    print "a > b"
    sys.exit(0)
if a < b:
    print "a < b"
    sys.exit(0)
if a == b:
    print "a == b"
    sys.exit(0)

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

a, b = [int(i) for i in fileinput.input().next().strip().split()]
if a > b:
	print "a > b"
if a < b:
	print "a < b"
if a == b:
	print "a == b

Fixed submission:
import fileinput
import sys

a, b = [int(i) for i in fileinput.input().next().strip().split()]
if a > b:
    print "a > b"
    sys.exit(0)
if a < b:
    print "a < b"
    sys.exit(0)
if a == b:
    print "a == b"
    sys.exit(0)
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
print a * b + " " + (a + b) * 2

Fixed submission:
a, b = raw_input().split(" ")
print str(int(a) * int(b)) + " " + str((int(a) + int(b)) * 2)

Buggy python submission (verdict: Runtime Error):
a, b = raw_input().split(" ")
print int(a) * int(b) + " " + (int(a) + int(b)) * 2

Fixed submission:
a, b = raw_input().split(" ")
print str(int(a) * int(b)) + " " + str((int(a) + int(b)) * 2)
Buggy python submission (verdict: Runtime Error):
for i in range(1:10):
	for j in range(1:10):
		print "%dx%d=%d" % (i, j, i*j)

Fixed submission:
#coding: UTF-8

for i in range(1, 10):
	for j in range(1, 10):
		print "%dx%d=%d" % (i, j, i*j)

Buggy python submission (verdict: Runtime Error):
  for i in range(1, 10):
	for j in range(1, 10):
		print "%dx%d=%d" % (i, j, i*j)

Fixed submission:
#coding: UTF-8

for i in range(1, 10):
	for j in range(1, 10):
		print "%dx%d=%d" % (i, j, i*j)
Buggy python submission (verdict: Runtime Error):
#coding UTF-8

import math
import sys

for line in sys.stdin:
	a,b = map(int, line.split(' '))
	print int(math.log10(a + b) + 1

Fixed submission:
#coding UTF-8

import math
import sys

for line in sys.stdin:
	a,b = map(int, line.split(' '))
	print int(math.log10(a + b)) + 1
Buggy python submission (verdict: Runtime Error):
dx = [0, 0, -1, 1]
dy = [1, -1, 0, 0]


def main():
    while True:
        map = []
        count = 0
        try:
            for i in range(12):
                map.append([x for x in input()])

            for i in range(12):
                for j in range(12):
                    if map[i][j] == '1':
                        dfs(map, j, i)
                        count += 1
            print(count)
        except EOFError:
            break


def dfs(map, x, y):
    if x < 0 or y < 0 or x >= 12 or y >= 12:
        return

    map[y][x] = '0'
    for i in range(4):
        next_x = x + dx[i]
        next_y = y + dy[i]
        if next_x >= 0 and next_x < 12 and next_y >= 0 and next_y < 12:
            if map[next_y][next_x] == '1':
                dfs(map, next_x, next_y)


if __name__ == '__main__':
    main()

Fixed submission:
import sys

dx = [0, 0, -1, 1]
dy = [1, -1, 0, 0]


def main():
    while True:
        map = []
        count = 0
        for i in range(12):
            map.append([x for x in input()])

        for i in range(12):
            for j in range(12):
                if map[i][j] == '1':
                    dfs(map, j, i)
                    count += 1
        print(count)

        if not sys.stdin.readline():
            break


def dfs(map, x, y):
    if x < 0 or y < 0 or x >= 12 or y >= 12:
        return

    map[y][x] = '0'
    for i in range(4):
        next_x = x + dx[i]
        next_y = y + dy[i]
        if next_x >= 0 and next_x < 12 and next_y >= 0 and next_y < 12:
            if map[next_y][next_x] == '1':
                dfs(map, next_x, next_y)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def fibo(n):
	S=[1,1]
	s=1
	if n>1:
		for i in range(2,n+1):
			S.append(S[i-1]+S[i-2])
			s=S[i]
	return s

def main():
	if __name__=="__main__":
		n=input()
		print(fibo(n))

main()

Fixed submission:
def fibo(n):
	S=[1,1]
	s=1
	if n>1:
		for i in range(2,n+1):
			S.append(S[i-1]+S[i-2])
			s=S[i]
	return s

def main():
	if __name__=="__main__":
		n=int(input())
		print(fibo(n))

main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
	n=input()
	List_1=[]
	max=-1000000001
	for i in range(n):
		List_1.append(input())
		for j in range(i-1,-1,-1):
				if max<List_1[i]-List_1[j]:
					max=List_1[i]-List_1[j]
	print(max)

if __name__=='__main__':
	main()

Fixed submission:
n=input()
for i in range(n):
	if i==0:
		num_1=input()
	elif i==1:
		num_2=input()
		maxv=num_2 - num_1
		MIN=min(num_1,num_2)
	else:
		num_3=input()
		if (num_3-MIN)>maxv:
			maxv=num_3-MIN
		if (num_3)<MIN:
			MIN=num_3
print(maxv)

Buggy python submission (verdict: Time Limit Exceeded):
def main():
	n=input()
	List_1=[]
	for i in range(n):
		List_1.append(input())
		if i==1:
			max=List_1[1]-List_1[0]
		elif i>1:
			for j in range(i-1,-1,-1):
				if max<List_1[i]-List_1[j]:
					max=List_1[i]-List_1[j]
	print(max)

if __name__=='__main__':
	main()

Fixed submission:
n=input()
for i in range(n):
	if i==0:
		num_1=input()
	elif i==1:
		num_2=input()
		maxv=num_2 - num_1
		MIN=min(num_1,num_2)
	else:
		num_3=input()
		if (num_3-MIN)>maxv:
			maxv=num_3-MIN
		if (num_3)<MIN:
			MIN=num_3
print(maxv)

Buggy python submission (verdict: Time Limit Exceeded):
n=input()
num_list=[]
for i in range(n):
    m=input()
    num_list.append(m)

Max=num_list[1]-num_list[0]

for i in range(n-1):
    for j in range(i+1,n):
        if Max<num_list[j]-num_list[i]:
            Max=num_list[j]-num_list[i]

print(Max)

Fixed submission:
n=input()
for i in range(n):
	if i==0:
		num_1=input()
	elif i==1:
		num_2=input()
		maxv=num_2 - num_1
		MIN=min(num_1,num_2)
	else:
		num_3=input()
		if (num_3-MIN)>maxv:
			maxv=num_3-MIN
		if (num_3)<MIN:
			MIN=num_3
print(maxv)
Buggy python submission (verdict: Runtime Error):
cul_list=raw_input().split()
cul_process=[]
ope_cnt=0
result=1
l=len(cul_list)
for i in range(l):
	if cul_list[i]=='+':
		cul_process.append(int(cul_list[i-2])+int(cul_list[i-1]))
		ope_cnt+=1
	elif cul_list[i]=='-':
		cul_process.append(int(cul_list[i-2])-int(cul_list[i-1]))
		ope_cnt+=1
	elif cul_list[i]=='*':
		if cul_list[i-1]=='+' or cul_list[i-1]=='-':
			for j in range(ope_cnt):
				result*=cul_process[j]
			cul_process.append(result)
			ope_cnt=0
		else:
			cul_process.append(int(cul_list[i-1]*int(cul_list[i-2])))
			ope_cnt+=1
print(cul_process[-1])

Fixed submission:

Stack=[]
def push(x):
    Stack.append(x)

def pop():
    return Stack.pop()

def solve():
    s_list=raw_input().split()
    for i in range(len(s_list)):
        if s_list[i]=='+':
            b=pop()
            a=pop()
            push(a+b)
        elif s_list[i]=='-':
            b=pop()
            a=pop()
            push(a-b)
        elif s_list[i]=='*':
            b=pop()
            a=pop()
            push(a*b)
        else:
            push(int(s_list[i]))
    print(pop())

def main():
    if __name__=="__main__":
        solve()

main()

Buggy python submission (verdict: Runtime Error):

Stack=[]
def push(x):
    Stack.append(x)

def pop():
    return Stack.pop()

def solve():
    s_list=raw_input().split()
    for i in range(len(s_list)):
        if s_list[i]=='+':
            b=pop()
            a=pop()
            push(a+b)
        elif s_list[i]=='-':
            b=pop()
            a=pop()
            push(a-b)
        elif s_list[i]=='*':
            b=pop()
            a=pop()
            push(a*b)
        else:
            push(int(s_list[i]))
    print(pop())

def main():
    if __name__=="__main__":
        solve()

main()

Fixed submission:

Stack=[]
def push(x):
    Stack.append(x)

def pop():
    return Stack.pop()

def solve():
    s_list=raw_input().split()
    for i in range(len(s_list)):
        if s_list[i]=='+':
            b=pop()
            a=pop()
            push(a+b)
        elif s_list[i]=='-':
            b=pop()
            a=pop()
            push(a-b)
        elif s_list[i]=='*':
            b=pop()
            a=pop()
            push(a*b)
        else:
            push(int(s_list[i]))
    print(pop())

def main():
    if __name__=="__main__":
        solve()

main()
Buggy python submission (verdict: Runtime Error):
class Dice(object):
	def __init__(self,List):
		self.face=List
	
	def n_spin(List):
		temp=List[0]
		List[0]=List[1]
		List[1]=List[5]
		List[5]=List[4]
		List[4]=temp

	def s_spin(List):
		temp=List[0]
		List[0]=List[4]
		List[4]=List[5]
		List[5]=List[1]
		List[1]=temp

	def e_spin(lList):
		temp=List[0]
		List[0]=List[3]
		List[3]=List[5]
		List[5]=List[2]
		List[2]=temp

	def w_spin(lList):
		temp=List[0]
		List[0]=List[2]
		List[2]=List[5]
		List[5]=List[3]
		List[3]=temp

dice = Dice(map(int,raw_input().split())
command = list(raw_input())
for k in command:
	if k=='N':
		dice.n_spin(dice.face)
	elif k=='S':
		dice.s_spin(dice.face)
	elif k=='E':
		dice.e_spin(dice.face)
	else:
		dice.w_spin(dice.face)
print dice.face[0]

Fixed submission:
class Dice(object):
	def __init__(self,List):
		self.face=List
	
	def n_spin(self,List):
		temp=List[0]
		List[0]=List[1]
		List[1]=List[5]
		List[5]=List[4]
		List[4]=temp

	def s_spin(self,List):
		temp=List[0]
		List[0]=List[4]
		List[4]=List[5]
		List[5]=List[1]
		List[1]=temp

	def e_spin(self,List):
		temp=List[0]
		List[0]=List[3]
		List[3]=List[5]
		List[5]=List[2]
		List[2]=temp

	def w_spin(self,List):
		temp=List[0]
		List[0]=List[2]
		List[2]=List[5]
		List[5]=List[3]
		List[3]=temp

dice = Dice(map(int,raw_input().split()))
command = list(raw_input())
for k in command:
	if k=='N':
		dice.n_spin(dice.face)
	elif k=='S':
		dice.s_spin(dice.face)
	elif k=='E':
		dice.e_spin(dice.face)
	else:
		dice.w_spin(dice.face)
print dice.face[0]
Buggy python submission (verdict: Runtime Error):
list = map(int,raw_input().split())
ilst.sort()
print'%d %d %d' %(list[0],list[1],list[2])     

Fixed submission:
list = map(int,raw_input().split())
list.sort()
print'%d %d %d' %(list[0],list[1],list[2])

Buggy python submission (verdict: Runtime Error):
list = map(int,raw_input().split())
ilst.sort()
print'%d %d %d' % (list[0],list[1],list[2])     

Fixed submission:
list = map(int,raw_input().split())
list.sort()
print'%d %d %d' %(list[0],list[1],list[2])

Buggy python submission (verdict: Runtime Error):
list = map(int,raw_input().split())
ilst.sort()
for i in list :
     print(i)

Fixed submission:
list = map(int,raw_input().split())
list.sort()
print'%d %d %d' %(list[0],list[1],list[2])

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,raw_input().split())
list = [a,b,c]
ilst.sort()
for i in list :
    print i

Fixed submission:
list = map(int,raw_input().split())
list.sort()
print'%d %d %d' %(list[0],list[1],list[2])
Buggy python submission (verdict: Runtime Error):
W,H,x,y,r = map(int,raw_input().split())
if x-r >= 0 && y-r >= 0 && x+r <= W && y+r <= H :
	print'Yes'
else :
	print'No'

Fixed submission:
W,H,x,y,r = map(int,raw_input().split())
if x-r >= 0 and y-r >= 0 and x+r <= W and y+r <= H :
	print'Yes'
else :
	print'No'
Buggy python submission (verdict: Runtime Error):
i = 1
while True :
	n = input()
	if n==0 :
		break
	else :
	print('Case %d: %d' % (i,n)
	i += 1

Fixed submission:
i = 1
while True :
	n = input()
	if n==0 :
		break
	else :
		print 'Case %d: %d' % (i,n)
	i += 1

Buggy python submission (verdict: Runtime Error):
i = 1
while True :
	n = input()
	if n==0 :
		break
	else :
	print'Case %d: %d' % (i,n)
	i += 1

Fixed submission:
i = 1
while True :
	n = input()
	if n==0 :
		break
	else :
		print 'Case %d: %d' % (i,n)
	i += 1
Buggy python submission (verdict: Runtime Error):
while True :
	x,y = map(int,raw_input.split())
	if x==0 and y==0 :
		break
	else :
		if a<b :
			print '%d %d' %(a,b)
		else :
			print '%d %d' %(b,a)

Fixed submission:
while True :
	x,y = map(int,raw_input().split())
	if x==0 and y==0 :
		break
	else :
		if x<y :
			print'%d %d' %(x,y)
		else :
			print'%d %d' %(y,x)

Buggy python submission (verdict: Runtime Error):
while True :
	x,y = map(int,raw_input.split())
	if x==0 and y==0 :
		break
	else :
		if x<y :
			print '%d %d' %(x,y)
		else :
			print '%d %d' %(y,x)

Fixed submission:
while True :
	x,y = map(int,raw_input().split())
	if x==0 and y==0 :
		break
	else :
		if x<y :
			print'%d %d' %(x,y)
		else :
			print'%d %d' %(y,x)
Buggy python submission (verdict: Runtime Error):
import sys

n = input()
i = 1
for i in range(n) :
	if i%3==0 :
		sys.stdout.write(??? %d???%i)
for j in range(n) :
	if(j%10==3):
		sys.stdout.wite(??? %d???%j)
print??????

Fixed submission:
import sys

n = input()
for i in range(1,n+1) :
	if i%3==0 :
		print(' '),
		sys.stdout.write(str(i))
	else:
		x = i
		while(x>0):
			if(x%10==3):
				print(' '),
				sys.stdout.write(str(i))
				break
			else :
				x/=10
print('')

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

n = input()
for i in range(n) :
	if i%3==0 :
		sys.stdout.write(??? %d???%i)
for j in range(n) :
	if(j%10==3):
		sys.stdout.wite(??? %d???%j)
print??????

Fixed submission:
import sys

n = input()
for i in range(1,n+1) :
	if i%3==0 :
		print(' '),
		sys.stdout.write(str(i))
	else:
		x = i
		while(x>0):
			if(x%10==3):
				print(' '),
				sys.stdout.write(str(i))
				break
			else :
				x/=10
print('')

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

n = input()
for i in range(n) :
	if i%3==0 :
		sys.stdout.write(??? ???)
		sys.stdout.write(str(i))
for j in range(n) :
	if(j%10==3):
		sys.stdout.write(??? ???)
		sys.stdout.wite(str(j))
print??????

Fixed submission:
import sys

n = input()
for i in range(1,n+1) :
	if i%3==0 :
		print(' '),
		sys.stdout.write(str(i))
	else:
		x = i
		while(x>0):
			if(x%10==3):
				print(' '),
				sys.stdout.write(str(i))
				break
			else :
				x/=10
print('')

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

n = input()
for i in range(1,n+1) :
	if i%3==0 :
		sys.stdout.write(??? ???)
		sys.stdout.write(str(i))
	elif(i%10==3):
		sys.stdout.write(??? ???)
		sys.stdout.wite(str(i))
print ??????

Fixed submission:
import sys

n = input()
for i in range(1,n+1) :
	if i%3==0 :
		print(' '),
		sys.stdout.write(str(i))
	else:
		x = i
		while(x>0):
			if(x%10==3):
				print(' '),
				sys.stdout.write(str(i))
				break
			else :
				x/=10
print('')