qyliang/CodeNanoFix huggingface dataset:
Buggy code:
while True:
     x,y=[int (i) for i in input().split()]
    if x==0 and y==0:
        break
    if  x >= y:
        print (y,x)
    elif x < y :
        print (x,y)


Fixed code:
while True:
    x,y=[int (i) for i in input().split()]
    if x==0 and y==0:
        break
    if  x >= y:
        print (y,x)
    elif x < y:
        print (x,y)
Buggy code:
import sys

for i,ws in enumerate(sys.stdin,1):
    list = map(int, ws[:-1].split())

    if list[0] == 0 and list[1] == 0:
        break

    print(' '.join(map(str,list.sort())))

Fixed code:
import sys

for i,ws in enumerate(sys.stdin,1):
    list = sorted(map(int, ws[:-1].split()))

    if list[0] == 0 and list[1] == 0:
        break

    print(' '.join(map(str,list)))
Buggy code:
while True :
  x,y = map(int,input().split())
  if y < x :
    print(y,x)
  elif x < y :
    print(x,y)
  else :
    break


Fixed code:
while True :
  x,y = map(int,input().split())
  if x == 0 and y == 0 :
    break
  elif y < x :
    print(y,x)
  else :
    print(x,y)
Buggy code:
while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split(' ')]
    if x == 0 and y == 0
        break     
    if x > y:
        z = x
        x = y
        y = z     
    print(x, y)

Fixed code:
import sys     
while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split(' ')]     
    if x == 0 and y == 0:
        break     
    if x > y:
        z = x
        x = y
        y = z     
    print(x, y)
Buggy code:
for i in range(3000):
  x,y=map(int,input().split())
  if x == 0 and y == 0:
    break
  print('{0} {1}'.format(x,y))

Fixed code:
for i in range(3000):
  x,y=map(int,input().split())
  if x == 0 and y == 0:
    break
  print('{0} {1}'.format(min(x,y),max(x,y)))
Buggy code:
# Swapping Two Numbers

zeroCount = 0
while zeroCount == 0:
    numbers = [int(i) for i in input().rstrip().split()]
    # print(numbers)
    if numbers[0] == 0 and numbers[1] == 0:
        zeroCount += 1
    else:
        swap = sorted(numbers)
        # print(swap)
        a = [str(n) for n in swap]
        print(a)



Fixed code:
# Swapping Two Numbers

zeroCount = 0
while zeroCount == 0:
    numbers = [int(i) for i in input().rstrip().split()]
    # print(numbers)
    if numbers[0] == 0 and numbers[1] == 0:
        zeroCount += 1
    else:
        swap = sorted(numbers)
        # print(swap)
        a = [str(n) for n in swap]
        print(" ".join(a))
Buggy code:
data = input().split()
a = int(data[0])
b = int(data[1])
while(a != 0 and b != 0):
	if a > b:
		temp = a
		a = b
		b = temp
	print(str(b) + " " + str(a))
	data = input().split()
	a = int(data[0])
	b = int(data[1])
	

Fixed code:
data = input().split()
a = int(data[0])
b = int(data[1])
while(a != 0 or b != 0):
	if a > b:
		temp = a
		a = b
		b = temp
	print(str(a) + " " + str(b))
	data = input().split()
	a = int(data[0])
	b = int(data[1])
Buggy code:
while True:
	a, b = sorted(map.(int,input().split()))
	if (a == 0) & (b == 0): break
	print(a,b)


Fixed code:
while True:
    a, b = sorted(map(int, input().split()))
    if (a == 0) & (b == 0): break
    print(a, b)
Buggy code:
while True:
    a, b = [int(x) for x in input().split()]
    if a == 0 and b == 0:
        break
    print(a, b)



Fixed code:
while True:
    a, b = [int(x) for x in input().split()]
    if a == 0 and b == 0:
        break
    if a < b:
        print(a, b)
    else:
        print(b, a)
Buggy code:
l = []
while True:
  s = [str(i) for i in input().split()]
  if s == ['0','0']:
    break
  else:
    l.append(s[0]+' '+s[1])
for i in l:
  print(i)

Fixed code:
l = []
while True:
  s = [int(i) for i in input().split()]
  if s == [0,0]:
    break
  else:
    s.sort()
    l.append(str(s[0])+' '+str(s[1]))
for i in l:
  print(i)
Buggy code:
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    elif a > b:
        print(b, a)
    elif a < b:
        print(a, b)

Fixed code:
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    elif a > b or a == b:
        print(b, a)
    elif a < b:
        print(a, b)
Buggy code:
for i in range(3000):
    x,y=[int(s) for s in input().split()]
    if x>y:
        print("{0} {1}".format(y,x))
    elif x<=y:
        print("{0} {1}".format(x,y))
    elif x==0 and y==0:
        break

Fixed code:
for i in range(3000):
    x,y=[int(s) for s in input().split()]
    if x==0 and y==0:
        break
    elif x<=y:
        print("{0} {1}".format(x,y))
    else :
        print("{0} {1}".format(y,x))
Buggy code:
import sys
 
while True :
    a, b = map(int, sys.stdin.readline().stlip())
    if (a == 0) & (b == 0) :
        break
    
    if a < b : print(a, b)
    else : print(b, a)

Fixed code:
import sys
 
while True :
    a, b = map(int, sys.stdin.readline().split())
    if (a == 0) & (b == 0) :
        break
    
    if a < b : print(a, b)
    else : print(b, a)
Buggy code:
for i in range(3000):
    a, b = map(int, input().split())
    
    if a == b == 0
        break
    
    if a < b:
        print(a, b)
    else
        print(b, a)
    
    
    


Fixed code:
for i in range(3000):
    a, b = map(int, input().split())
    
    if a == b == 0:
        break
    elif a < b:
        print(a, b)
    else:
        print(b, a)
Buggy code:

while True:
	a,b  = map(int, input().split())
	if a,b == 0,0: break
	if a > b: a,b = b,a
	print(f"{a} {b}")


Fixed code:

while True:
	a,b  = map(int, input().split())
	if a == 0 and b == 0: break
	if a > b: a,b = b,a
	print(f"{a} {b}")
Buggy code:
while True:
    x, y = map(int, input().split())
    if (x == y == 0):
        break
    else if (x > y):
        print(y, x)
    else:
        print(x, y)

Fixed code:
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:break
    elif x>y:
        print(y,x)
    else:
        print(x,y)
Buggy code:
x = []
y = []
i = 0

while True:
  a, b = map(int, raw_input().split())
  if b < a:
    stock = a
    a = b
    b = stock
  x.append(a)
  y.append(b)
  if x[i] == 0 and y[i] == 0:
    break
  i += 1

for j in range(i):
  print(str(x[j]), str(y[j]))

Fixed code:
x = []
y = []
i = 0

while True:
  a, b = map(int, input().split())
  if b < a:
    stock = a
    a = b
    b = stock
  x.append(a)
  y.append(b)
  if x[i] == 0 and y[i] == 0:
    break
  i += 1

for j in range(i):
  print(str(x[j]), str(y[j]))
Buggy code:
result = []
while True:
    my_value = input()
    my_value_list = []
    my_value_list = ([int(x) for x in my_value.split()])
    my_value_list.sort()
    result.append(my_value_list)
    if my_value_list[0] == 0 and my_value_list[1] == 0:
        break

for i in range(0, len(result)):
    print("{} {}".format(result[i][0], result[i][1]))

Fixed code:
result = []
while True:
    my_value = input()
    my_value_list = []
    my_value_list = ([int(x) for x in my_value.split()])
    my_value_list.sort()
    result.append(my_value_list)
    if my_value_list[0] == 0 and my_value_list[1] == 0:
        result.pop()
        break

for i in range(0, len(result)):
    print("{} {}".format(result[i][0], result[i][1]))
Buggy code:
while True:
     a,b=map(int, input().split())
     x=[a,b]
     if a =0 and b=0:break
     x.sort()
     print(x[0],x[1])
     


Fixed code:
while True:
     a,b=map(int, input().split())
     x=[a,b]
     if a ==0 and b==0:break
     x.sort()
     print(x[0],x[1])
Buggy code:
while True:
 x,y=sorted [int(x) for x in input().split()]
 if (x,y)==(0,0):
  break
 print(x,y)

Fixed code:
while True:
 x,y=sorted ([int(x) for x in input().split()])
 if (x,y)==(0,0):
  break
 print(x,y)
Buggy code:
while True:
    a,b = map(int,input().split())
    if x == 0 and b == 0:
        break
    else:
        if a < b:
            print(a,b)
        elif a > b:
            print(b,a)


Fixed code:
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    elif a < b:
        print(a, b)
    else:
        print(b ,a)
Buggy code:
list = []
while True:
    num = list(map(int,input().split()))
    if(num[0] == 0 and num[1] == 0):
        break
    else:
        if(num[0] > num[1]):
            print("%d %d" %(num[1],num[0]))
        else:
            print("%d %d" %(num[0],num[1]))
            


Fixed code:
while True:
    nums = list(map(int, input().split(" ")))
    if nums[0] == nums[1] and nums[1] == 0:
        break
    else:
        if nums[0] > nums[1]:
            nums[0], nums[1] = nums[1] ,nums[0]
        print("%d %d" %(nums[0], nums[1]))
Buggy code:
while True:
    x,y = map(int,input().split())
    if x > y:
        print(f"{y} {x}")
    elif x <= y:
        print(f"{x} {y}")
    elif x == 0 and y == 0:
        break


Fixed code:
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        x, y = y, x
    print(f'{x} {y}')
Buggy code:
for i in range(10000):
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    else:
        if a > b:
            print(a, b)
        else:
            print(b, a)
        #print(min(a,b), max(a,b))


Fixed code:
for i in range(10000):
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    else:
        if a < b:
            print(a, b)
        else:
            print(b, a)
        #print(min(a,b), max(a,b))
Buggy code:
while True:
    results = list(map(str, sorted(map(int, input().split()))))
    if len(results) == len(list(filter(lambda item: item == '0', results)))
        break
    print ' '.join(results)

Fixed code:
while True:
    results = list(map(str, sorted(map(int, input().split()))))
    if len(results) == len(list(filter(lambda item: item == '0', results))):
        break
    print(' '.join(results))
Buggy code:
while True:
  a,b = map(int, input().split())
  if a == 0 and b == 0: break
  if a > b:
    print(b, a)
else:
    print(a, b)


Fixed code:
while True :
    a,b =map(int,input().split())
    if a==0 and b==0:
        break
    if a<b :
        print(a,b)
    else:
        print(b,a)
Buggy code:
a = []
b = []
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    else:
        a.append(x)
        b.append(y)
        
for i in range(0,len(a)):
    if a[i] >= b[i]:
        print(a[i],b[i])
    elif a[i] < b[i]:
        print(b[i],a[i])

Fixed code:
a = []
b = []
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    else:
        a.append(x)
        b.append(y)
        
for i in range(0,len(a)):
    if a[i] >= b[i]:
        print(b[i],a[i])
    elif a[i] < b[i]:
        print(a[i],b[i])
Buggy code:
while True:
    x=input().split()
    if x == "0 0":
        break
    x=list(map(int,x))
    x= sorted(x)
    a,b=x[0], x[1]
    print("{0} {1}".format(a,b))

Fixed code:
while True:
    x=input().split()
    if x == ["0","0"]:
        break
    x=list(map(int,x))
    x= sorted(x)
    a,b=x[0], x[1]
    print("{0} {1}".format(a,b))
Buggy code:
while True:
    (x, y) = [int(i) for i in input().split()]
    if x == 0 and y == 0:
        break
    if x >= y :
        print(x, y)
    else:
        print(x, y)

Fixed code:
while True:
    (x, y) = [int(i) for i in input().split()]
    if x == 0 and y == 0:
        break
    if x >= y :
        print(y, x)
    else:
        print(x, y)
Buggy code:
while True:
    x, y = [int(n) for n in input().split()]
    if x or y:
        break
    if x < y:
        print(x, y)
    else:
        print(y, x)

Fixed code:
while True:
    x, y = [int(n) for n in input().split()]
    if not (x or y):
        break
    if x < y:
        print(x, y)
    else:
        print(y, x)
Buggy code:
while True:
	a,b=sort(map(int,input().split()))
	if (a==0) and (b==0):
		break
	print(a,b)


Fixed code:
while True:
	a,b=map(int,input().split())
	if (a==0) and (b==0):
		break
	if a > b :
		a,b = b,a
	print(a,b)
Buggy code:
while True:
    x,y = map(int(input().split())
    if (x,y) ==(0,0): break
    if x < y:
        print(x,y)
    else:
        print(y,x)


Fixed code:
while True:
    x, y = map(int, input().split())
    if x ==0 and y==0:
        break
    else:
        if x < y:
            print(x, y)
        else:
            print(y, x)
Buggy code:
x,y = map(int, input().split())
if x==0 and y==0:
 break
if x <= y:
 print(x,y)
else:
 print(y,x)

 


Fixed code:
while True:
 x,y = map(int, input().split())
 if x==0 and y==0:
  break
 if x <= y:
  print(x,y)
 else:
  print(y,x)
Buggy code:
import sys    
while True :
    a, b = map(int, sys.stdin.readline().split())
    if (a == 0) & (b == 0) :
        break
      if a < b : print(a, b)
      else : print(b, a)

Fixed code:
import sys
    
num = sys.stdin
    
while True :
    a, b = map(int, num.readline().split())
    if (a == 0) & (b == 0) :
        break
    
    if a < b : print(a, b)
    else : print(b, a)
Buggy code:
import sys
while True:
    a,b=map(int,stdin.readline().split())
    if a==0 and b==0:
        break
    if a<b:print(a,b)
    else:print(b,a)

Fixed code:
import sys
while True:
    a,b=map(int,sys.stdin.readline().split())
    if a==0 and b==0:
        break
    if a<b:print(a,b)
    else:print(b,a)
Buggy code:
x, y = map(int, input().split())
while not( x == 0 and y == 0 ):
 if x < y : print(x, y)
 else : print(y, x)

Fixed code:
x, y = map(int, input().split())
while not( x == 0 and y == 0 ):
 if x < y : print(x, y)
 else : print(y, x)
 x, y = map(int, input().split())
Buggy code:
num = []
while True:
    n = input()
    a, b = [int(x) for x in n.split()]
    if a == 0 and b == 0:
        break
    num.append([a, b])

for ls in num:
    ls.sort()
    print('{} {}'.format(ls[0], ls[1])

Fixed code:
num = []
while True:
    n = input()
    a, b = [int(x) for x in n.split()]
    if a == 0 and b == 0:
        break
    num.append([a, b])

for ls in num:
    ls.sort()
    print('{} {}'.format(ls[0], ls[1]))
Buggy code:
#!usr/bin/env python3

def string_two_numbers_spliter():
    x, y = [int(i) for i in input().split()]
    return x, y


def swap_two_numbers_asc(x, y):
    print('before swap in func: ', x, y)
    x, y = y, x
    print('after swap in func: ', x, y)
    return x, y


def main():
    while True:
        x, y = string_two_numbers_spliter()
        print('after split: ', x, y)
        if x == 0 and y == 0:
            print('x = 0, y = 0: ', x, y)
            break
        if x > y:
            print('before swap: ', x, y)
            x, y = swap_two_numbers_asc(x, y)
            print('after swap: ', x, y)
        print('%d %d' % (x, y))


if __name__ == '__main__':
    main()

Fixed code:
#!usr/bin/env python3

def string_two_numbers_spliter():
    x, y = [int(i) for i in input().split()]
    return x, y


def swap_two_numbers_asc(x, y):
    x, y = y, x
    return x, y


def main():
    while True:
        x, y = string_two_numbers_spliter()
        if x == 0 and y == 0:
            break
        if x > y:
            x, y = swap_two_numbers_asc(x, y)
        print('%d %d' % (x, y))


if __name__ == '__main__':
    main()
Buggy code:
l = []
while True:
    N, M = map(int, input().split())
    if (N == 0 and M == 0):
        break;
    if (N > M):
        l.append([M, N])
    elif (N < M):
        l.append([N, M])

for i in l:
    print("{} {}".format(i[0], i[1]))

Fixed code:
l = []
while True:
    N, M = map(int, input().split())
    if (N == 0 and M == 0):
        break;
    if (N > M):
        N, M = M, N
    l.append([N, M])

for i in l:
    print("{} {}".format(i[0], i[1]))
Buggy code:
while True:
    x, y = sorted(map(int, input().split()))
    if x==y and y==0:
    print(x, y)
    x,y = sorted(map(int, input().split()))


Fixed code:
while True :
    x, y = sorted(map(int, input().split()))
    if x == y and y == 0 : break
    print(x, y)
Buggy code:
while True:
    a,b = map(int, input().split())
    if (a,b) == (0,0) :
        break
    elif a > b:
        c = a
        a = b
        b = c
    else:
    print("{} {}".format(a,b))


Fixed code:
while True:
    a,b = map(int, input().split())
    if (a,b) == (0,0) :
        break
    elif a > b:
        c = a
        a = b
        b = c
    print("{} {}".format(a,b))
Buggy code:
while(1):
	a, b = map(int, input().split())
	if a == 0 and b == 0:
		break
	print (str(a)+" "+str(b))

Fixed code:
while(1):
	a, b = map(int, input().split())
	if a == 0 and b == 0:
		break
	if a>b:
		a, b = b, a
	print (str(a)+" "+str(b))
Buggy code:
while True:
    x,y = map(int,input().split())
    if x == y == 0:
        break
    if x > y:
        print(y,x)
    print(x,y)

Fixed code:
while True :
    x, y = map(int, input(). split())
    if x == 0 and y == 0 :
        break
    if x > y:
        x, y = y, x
    print (x, y)
Buggy code:
x,y = map(int, input().split())

while True:

    if x == 0 and y == 0:
        break

    elif x <= y:
        print(x,y)

    else:
        print(y, x)



Fixed code:
while True:
	x,y = map(int,input().split(" "))

	if (x == 0 and y == 0):
		break
	else:
		if x > y:
			print(y,x)
		elif  x < y:
			print(x,y)
		else:
			print(x,y)
Buggy code:
while True:
    (x, y) = (int(i) for i in input().split())
    if x = 0 and y = 0:
        break
    elif x <= y:
        print(x, y)
    else:
        print(y, x)

Fixed code:
while True:
    (x, y) = (int(i) for i in input().split())
    if x == 0 and y == 0:
        break
    elif x <= y:
        print(x, y)
    else:
        print(y, x)
Buggy code:
while True:
    x,y = map(int, input().split())

    if x == 0 and y == 0:
        break;

    elif x => y:
        print(str(x) + " " + str(y))

    else:
        print(str(y) + " " + str(x))



Fixed code:
while True:
    x,y = map(int, input().split())

    if x == 0 and y == 0:
        break;

    elif x <= y:
        print(str(x) + " " + str(y))

    else:
        print(str(y) + " " + str(x))
Buggy code:
x,y = map(int, input().split())

while True:

    if x == 0 and y == 0:
        break

    elif x => y:
        print(str(x) + " " + str(y))

    else:
        print(str(y) + " " + str(x))



Fixed code:
while True:
    x,y = map(int, input().split())

    if x == 0 and y == 0:
        break

    elif x <= y:
        print(str(x) + " " + str(y))
    else:
        print(str(y) + " " + str(x))
Buggy code:

import sys 
while True:
	x,y = map(int,sys.stdin.inputline().split())
	if x==0 & y==0:
		break
	else:
		if x<=y:
			print(x,y)
		else:
			print(y,x)

Fixed code:
import sys 
while True:
	x,y = map(int,sys.stdin.readline().split())
	if (x==0) & (y==0):
		break
	
	if x<=y:
		print(x,y)
	else:
		print(y,x)
Buggy code:
x = 1
y = 1
while not(x == 0 and y == 0):
    x, y = map(int, input().split())
    if x <= y:
        print(x, y)
    else:
        print(y, x)

Fixed code:
x, y = map(int, input().split())
while 1:
    if x == 0 and y == 0:
        break
    if x < y:
        print(x, y)
    else:
        print(y, x)
    x, y = map(int, input().split())
Buggy code:
while True:
    l = input().split()
    b = int(l[0])
    c = int(l[1])
    if b == 0 and c == 0:
        break
    print(b,c)

Fixed code:
while True:
    l = input().split()
    b = int(l[0])
    c = int(l[1])
    if b == 0 and c == 0:
        break
    if b < c:
        print(b, c)
    else:
        print(c, b)
Buggy code:
while True:
    x,y = map(int,input().split)
    if (x,y) == (0,0):
        break
    else:
        if x < y:
            print(x,y)
        else:
            print(y,x)



Fixed code:
while True:
    x,y = map(int,input().split())
    if (x,y) == (0,0):
        break
    else:
        if x < y:
            print(x,y)
        else:
            print(y,x)
Buggy code:
while True
    x,y = (int,input().split)
    if (x,y) == (0,0):
        break
    else:
        if x < y:
            print(x,y)
        else:
            print(y,x)


Fixed code:
while True:
    x, y = input().split()
    x = int(x)
    y = int(y)
    if (x != 0) or (y != 0):
        if x < y:
            print(x, y)
        else:
            print(y, x)
    else:
        break
Buggy code:
1inport sys
for i in sys.stdin.readlines():
        a, b = i.strip().split()
        if a == "0" and b == "0":
                break;

        if int(a) < int(b):
                print("{} {}".format(a,b))
        else:
                print("{} {}".format(b,a))
        

Fixed code:
import sys
for i in sys.stdin.readlines():
        a, b = i.strip().split()
        if a == "0" and b == "0":
                break

        if int(a) < int(b):
                print("{} {}".format(a,b))
        else:
                print("{} {}".format(b,a))
Buggy code:
1inport sys
for i in sys.stdin.readlines():
        a,b = i.strip().split()
        if a == "0" and b == "0":
                break;

        if int(a) < int(b):
                print("{0} {1}".format(a,b))
        else:
                print("{1} {0}".format(a,b))
        

Fixed code:
import sys
for i in sys.stdin.readlines():
        a,b = i.strip().split()
        if a == "0" and b == "0":
                break

        if int(a) < int(b):
                print("{0} {1}".format(a,b))
        else:
                print("{1} {0}".format(a,b))
Buggy code:
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    else:
        a = [x, y]
        a.sort()
        print(a)

Fixed code:
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    else:
        a = [x, y]
        a.sort()
        print(a[0], a[1])
Buggy code:
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    else:
        print(x, y)

Fixed code:
while True:
    x,y = map(int,input().split())
    if x== 0 and y == 0:
        break
    if x < y:
        print(x, y)
    else:
            print(y, x)
Buggy code:
while True:
    c = input().split()
    x, y = int(c[0]), int(c[1])
    if x == y == 0:
        break
    if y < x:
        x, y = y, x
    print("%d %d" % (y, x))



Fixed code:
while True:
    c = input().split()
    x, y = int(c[0]), int(c[1])
    if x == y == 0:
        break
    if y < x:
        x, y = y, x
    print("%d %d" % (x, y))
Buggy code:
while True:
    (x, y) = [int(i) for i in input().split()]
    print(x, y)
    if x == 0 and y == 0:
        break
    if x >= y:
        print(y, x)
    else:
        print(x, y)

Fixed code:
while True:
    (x, y) = [int(i) for i in input().split()]
    
    if x == 0 and y == 0:
        break
    if x >= y:
        print(y, x)
    else:
        print(x, y)
Buggy code:
A=1
B=1
x=[]
while True:
    if A==0 and B==0:
        break
    else:
        A, B= map(int, input().split())
        if A > B:
            print(B,A)
        else:
            print(A,B)
           

Fixed code:

x=[]
while True:
    A, B= map(int, input().split())   
    if A==0 and B==0:
        break
    else:
        if A > B:
            print(B,A)
        else:
            print(A,B)
Buggy code:
import sys

while 1:
  str = sys.stdin.readline().strip()
  if str=="0 0":
    break
  print(sorted(str.split(" "), key=int))

Fixed code:
import sys

while 1:
  str = sys.stdin.readline().strip()
  if str=="0 0":
    break
  print(" ".join(sorted(str.split(" "), key=int)))
Buggy code:
import sys

while 1:
  str = sys.stdin.readline().strip()
  a , b = sorted(str.split(" "), key=int)
  if a, b == "0":
    break
  print(a,b)

Fixed code:
import sys

while 1:
  a , b = sorted(sys.stdin.readline().strip().split(" "), key=int)
  if a == b == "0":
    break
  print(a,b)
Buggy code:
import sys

while 1:
  a , b = map(int, sys.stdin.readline().split())
  #if a == b == 0:
    break
  #elif a > b :
  #  print(b,a)
  #else :
#	print(a,b)

Fixed code:
import sys

while 1:
  a , b = map(int, sys.stdin.readline().split())
  if a == b == 0:
    break
  elif a > b :
    print(b,a)
  else :
    print(a,b)
Buggy code:
import sys

while 1:
  a , b = map(int(),sys.stdin.readline().split())
  if a == b == 0:
    break
  elif a > b :
    print(b,a)
  else :
	print(a,b)

Fixed code:
import sys

while 1:
  a , b = sys.stdin.readline().split()
  if a == b == "0":
    break
  elif int(a) > int(b) :
    print(b,a)
  else :
    print(a,b)