qyliang/CodeNanoFix huggingface dataset:
Buggy code:
while True:
    input=input()
    a,b=map(int,input.split())
    if (a==b):
        if (a==0):
            break
    if (a<b):
        print(f"{a} {b}")
    else:
        print(f"{b} {a}")
    


Fixed code:
while True:
    a,b=map(int,input().split())
    if (a==b):
        if (a==0):
            break
    if (a<b):
        print(f"{a} {b}")
    else:
        print(f"{b} {a}")
Buggy code:
import sys
 
ff = sys.stdin
 
while True :
    a, b = map(int, ff.readline().split())
    if (a == 0) & (b == 0) :
    break
    elif a < b :
        print(a, b)
    else :
        print(b, a)

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


Fixed code:
while 1:
  x,y = sorted(map(int,input().split()))
  if not (x or y): break
  print(x,y)
Buggy code:
while True:
    a,b=map(int,input().sprit())
    if (a==0 and b==0):
        break
    if a>b:
        swap=a
        a=b
        b=swap
        
    print('%d %d'%(a,b))




Fixed code:
while True:
    a,b=map(int,input().split())
    if (a==0 and b==0):
        break
    if a>b:
        swap=a
        a=b
        b=swap       
    print('%d %d'%(a,b))
Buggy code:
# -*- coding: utf-8 -*-
for c in range(3000):
    l = input().strip().split()
    x = int(l[0])
    y = int(l[1])
    if(x < 1 and y < 0):
        break
    elif(x > y):
        print("Case {0}: {1}".format(y,x))
    else:
        print("Case {0}: {1}".format(x,y))

Fixed code:
# -*- coding: utf-8 -*-
for c in range(3000):
    l = input().strip().split()
    x = int(l[0])
    y = int(l[1])
    if((x < 1) and (y < 1)):
        break
    elif(x > y):
        print("{0} {1}".format(y,x))
    else:
        print("{0} {1}".format(x,y))
Buggy code:
while True:
    x,y = map(int, input().split())
    if x == 0 and y == 0 :
        break
    elif x <= y :
        print (x,y)
    else x > y :
        print (y,x)

Fixed code:
while True:
    x, y = map(int, 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
    if x => y:
        print (y,x)
    else:
        print (x,y)

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

    if x > y:
        print(y, x)
    else:
        print(x, y)
Buggy code:
xy_data=[]
while True:
    xy=list(map(int,input().split()))
    xy.sort()
    print(xy)
    if xy[0]==xy[1]==0:
        break
    else:
        xy_data.append(xy)
for xy in xy_data:
    print(*xy)

Fixed code:
xy_data=[]
while True:
    xy=list(map(int,input().split()))
    xy.sort()
    if xy[0]==xy[1]==0:
        break
    else:
        xy_data.append(xy)
for xy in xy_data:
    print(*xy)
Buggy code:
i=1
while True:
    x,y = map(int, input().split())
    if x == 0 and y == 0:
         break
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
    if x > y:
        print(y, x)
    else:
        print(x, y)
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(b, a)
    else:
        print(a, b)
Buggy code:
while True:
    x,y = map(int, input().split())
    if x == 0 and y == 0:
          break
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
    if x<y: 
       print (x,y)
    else:
        print(y,x)
Buggy code:
while True:
    x = list(map(int, input().split()))
    if x == y == 0:
        break
    print(min(x), max(x))

Fixed code:
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    print(min(x,y),max(x,y))
Buggy code:
while True:
    xy_list = list(map(int, input().split()))
    if xy_list[0] == xy_list[1] == 0:
        break
    print(sorted(xy_list))

Fixed code:
while True:
    xy_list = list(map(int, input().split()))
    if xy_list[0] == xy_list[1] == 0:
        break
    print(*sorted(xy_list))
Buggy 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)

        

Fixed 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)
Buggy code:
while True:
  line = input().split()
  if line == '0 0':
    break
  if int(line[0]) < int(line[1]):
    print('{} {}'.format(line[0],line[1]))
  else: print('{} {}'.format(line[1], line[0]))

Fixed code:
while True:
  line = input()
  if line == '0 0':
    break
  line = line.split()
  if int(line[0]) < int(line[1]):
    print('{} {}'.format(line[0],line[1]))
  else: print('{} {}'.format(line[1], line[0]))
Buggy code:
while True :
    x, y = list(map(int,input().split()))
    if x == 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(y,x)
    else:
        print(x,y)
Buggy code:
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    elif a > b:
        print(f"b a")
    else:
        print(f"a b")



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



Fixed 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)
Buggy code:
import sys

n = sys.stdin.readlines()
for i in n:
    a = [int(x) for x in i.split()]
    if a[0] == a[1]:
        break
    print(*sorted(a))

Fixed code:
import sys

n = sys.stdin.readlines()
for i in n:
    a = [int(x) for x in i.split()]
    if a[0] == 0 and a[1] == 0:
        break
    print(*sorted(a))
Buggy code:
list1=[]
while True:
    x = str(input(""))
    if x == "0":
        break
    else:
        list1.append(x)

for i,v in enumerate(list1):
    x,y = map(int,v.split())
    if x < y:
        print(str(x) + " " + str(y))
    else:
        print(str(y) + " " + str(x))

Fixed code:
list1=[]
while True:
    x = input("")
    if x == "0 0":
        break
    else:
        list1.append(x)

for i,v in enumerate(list1):
    x,y = map(int,v.split())
    if x <= y:
        print(str(x) + " " + str(y))
    else:
        print(str(y) + " " + str(x))
Buggy code:
for i in range(0, 3000):
    array = map(int, input().split(' '))
    print(array)
    if array[0] == 0 and array[1] == 0:
        break
    else:
        print(' '.join(map(str, sorted(array))))


Fixed code:
for i in range(0, 3000):
    array = [int(x) for x in input().split(' ')]
    if array[0] == 0 and array[1] == 0:
        break
    else:
        print(' '.join([str(x) for x in sorted(array)]))
Buggy code:

while True:
    x,y = input().split()
    x = int(x)
    y = int(y)
    if x==0 and y==0:
        break
    elif x<y:
        print(y,x)
    elif x>y:
        print(x,y)

    


Fixed code:

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

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


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


Fixed code:
bul = True

while bul:

    x,y = input().split()
    x = int(x)
    y = int(y)

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

    elif (x > y):
        print (y,x)

    else:
        print (x,y)
Buggy code:
x,y = input().split()
x = int(x)
y = int(y)
while True:
    if x == 0 and y == 0:
        break
if x<y:
    print(y,x)
if x>y:
    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:
while True:
    x,y = [int(i) for i in input().split()]
    if x>y:
        print(str(y) + " " + str(x))
    else:
        print(str(x) + " " + str(y))
    if x == 0 and y == 0:
        break


Fixed code:
while True:
    x,y = [int(i) for i in input().split()]
    if x == 0 and y == 0:
        break
    if x>y:
        print(str(y) + " " + str(x))
    else:
        print(str(x) + " " + str(y))
Buggy code:
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1) 
    

Fixed code:
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
        break
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)
Buggy code:
import sys
while 1:
  x,y= sys.stdin.readline().split()
  if x == y == "0":
   break
  elif int(x)>int(y):
   print(x,y)
  else:
   print(y,x)

Fixed code:
import sys

while 1:
  x,y= sys.stdin.readline().split()
  if x == y == "0":
   break
  elif int(x)>int(y):
   print(y,x)
  else:
   print(x,y)
Buggy code:
import sys
while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split()]
    if x == 0 == y:
        break
    if x > y:
    
    print(x, y)

Fixed code:
import sys
while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split()]
    if x == 0 == y:
        break
    if x > y:
        z = x
        x = y
        y = z

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

Fixed code:
while 1:
	a, b = map(int, input().split())
	if a == 0 and b == 0:
		break
		
	if b < a:
		print(b, a)
	else:
		print(a, b)
Buggy code:
(x,y) = [int(i) for i in input().rstrip().split(' ')]

while True:
 if x == 0 and y == 0:
  break
 print('{0} {1}'.format(x,y))

Fixed code:
while True:
 (x,y) = [int(i) for i in input().rstrip().split(' ')]
 if x == y  == 0:
  break
 if(x < y):
  print('{0} {1}'.format(x,y))
 else:
  print('{0} {1}'.format(y,x))
Buggy code:
import sys
for i in sys.stdin:
    print(i)
    a, b = sorted(map(int, i.split()))
    if a != 0 or b != 0:
        print(a, b)
    else:
        break

Fixed code:
import sys
for i in sys.stdin:
    a, b = sorted(map(int, i.split()))
    if a != 0 or b != 0:
        print(a, b)
    else:
        break
Buggy code:
import sys
for c in sys.stdin:
    a,b=sorted(map(int,c.split()))
    if a=b==0:break
    print(a,b)

Fixed code:
import sys
for c in sys.stdin:
    a,b=sorted(map(int,c.split()))
    if a==0 and b==0:break
    print(a,b)
Buggy code:
while True :
    (x,y) = [int(i) for i in input().split()]
    if 0 = x and 0 = y:
        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 == y == 0 :
        break

    if x <= y :
        print(x, y)
    else :
        print(y, x)
Buggy code:
import sys
while True :
    ab = list(map(int,sys.stdin.readline().split()))
    a = ab[0]
    b = ab[1]
    if a == 0 and b == 0 :
        break
    else :
        sorted(ab)
        print(ab[0],ab[1])

Fixed code:
import sys
while True :
    ab = list(map(int,sys.stdin.readline().split()))
    a = ab[0]
    b = ab[1]
    if a == 0 and b == 0 :
        break
    else :
        ab = sorted(ab)
        print(ab[0],ab[1])
Buggy code:
while True:
    a, b = sorted([int(i) for i in input().split()])
    if not(a or b):
        break
    print(b,a)

Fixed code:
while True:
    a, b = sorted([int(i) for i in input().split()])
    if not(a or b):
        break
    print(a,b)
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(x,y)
    else:
      print(y,x)
Buggy code:
while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split()]
    if x == 0 == y:
        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 == y:
        break
    if x > y:
        z = x
        x = y
        y = z
 
    print(x, y)
Buggy code:

n=[]
line=''
while line != [0,0]:
    line=list(map(int,input().split()))
    n.append(line)
for i in range(len(n)-1):
    print('%d %d'%(n[i][0] if n[i][0]>=n[i][1] else n[i][1],n[i][0] if n[i][0]<=n[i][1] else n[i][1]))javascript:void(0)

Fixed code:
n=[]
line=''
while line != [0,0]:
    line=list(map(int,input().split()))
    n.append(line)
for i in range(len(n)-1):
    print('%d %d'%(n[i][0] if n[i][0]<=n[i][1] else n[i][1],n[i][0] if n[i][0]>=n[i][1] else n[i][1]))
Buggy code:
a=[]
while True:
    m,n=input().split()
    if m==n=="0":
        break
    else:
        a.append(sorted([int(m),int(n)]))
print(a)
for i in range(len(a)):
    print("{0} {1}".format(a[i][0],a[i][1]))

Fixed code:
a=[]
while True:
    m,n=input().split()
    if m==n=="0":
        break
    else:
        a.append(sorted([int(m),int(n)]))
for i in range(len(a)):
    print("{0} {1}".format(a[i][0],a[i][1]))
Buggy code:
def ex(x, y):
    if x < y:
        tmp = x
        x = y
        y = tmp
    return x, y

def ex2num():
    r1, r2 = input().split(" ")
    r1 = int(r1)
    r2 = int(r2)
    while (0 != r1) or (0 != r2):
        r1, r2 = ex(r1, r2)
        print(r1, r2)
        r1, r2 = input().split(" ")
        r1 = int(r1)
        r2 = int(r2)

    return 0

if __name__ == "__main__":
    ret = ex2num()


Fixed code:
def ex(x, y):
    if x > y:
        tmp = x
        x = y
        y = tmp

    return x, y

def ex2num():
    r1, r2 = input().split(" ")
    r1 = int(r1)
    r2 = int(r2)
    while (0 != r1) or (0 != r2):
        r1, r2 = ex(r1, r2)
        print(r1, r2)
        r1, r2 = input().split(" ")
        r1 = int(r1)
        r2 = int(r2)

    return 0

if __name__ == "__main__":
    ret = ex2num()
Buggy code:
while True:
  x,y=map(int,input().split())

  if x<y:
    print(x,y)

  elif y<x:
    print(y,x)

  elif x==y==0:
    break



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

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:
while True:
	x,y=sorted(map(int,input().split()))
	if (x==0) and(y==0):
		break
	print(*a)


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

    if x == y == 0:
        break

if x > y:
    x, y = y, x

print(x, y)

Fixed code:
while True:
    x, y = [int(i) for i in input().split()]
 
    if x == y == 0:
        break
 
    if x > y:
        x, y = y, x
 
    print(x, y)
Buggy code:
while True:
  x,y=map(int, input().split())
​
  if x==0 and y==0:
    break
  if x>=y:
    tmp = x
    x=y
    y=tmp
​
  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:
while True:
 a=input
 x,y=map(int,a.split())
 if x*y==0:break
 if x>y:print(f'{y} {x}')
 else:print(a)

Fixed code:
while True:
 a=input()
 if a=="0 0":break
 x,y=map(int,a.split())
 if x>y:print(f'{y} {x}')
 else:print(a)
Buggy code:
a=[]
while 1:
 n=input()
 if n=='0 0':break
 x,y=map(int,n.split())
 print(y,x) if x>y else:print(n)

Fixed code:
a=[]
while 1:
 n=input()
 if n=='0 0':break
 x,y=map(int,n.split())
 print(y,x) if x>y else print(n)
Buggy code:
a=[]
while True:
 n=input()
 if int(n)==0:break
 a.append(n)
for s in a:
 x,y=map(int,s.split())
 if x>y:print(f'{y} {x}')
 else:print(s)

Fixed code:
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 x,y=map(int,s.split())
 print(f'{y} {x}') if x>y else print(s)
Buggy code:
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 print(*sorted(map(int,a.split())))

Fixed code:
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 print(*sorted(map(int, s.split())))
Buggy code:
a=[]
import sys
for s.strip() in sys.stdin:
 if s=='0 0':break
 a.append(s)
for t in a:
 x,y=map(int,t.split())
 print(f'{y} {x}') if x>y else print(t)

Fixed code:
a=[]
import sys
for s in sys.stdin:
 if s=='0 0\n':break
 a.append(s)
for t in a:
 x,y=map(int,t.split())
 print(f'{y} {x}') if x>y else print(t.strip())
Buggy code:
a=[]
import sys
for s in sys.stdin:
 s=s.strip()
 if s=='0 0':break
 a.append(s)
for t in a:
 print(*sorted(map(int,t)))

Fixed code:
a=[]
import sys
for s in sys.stdin:
 s=s.strip()
 if s=='0 0':break
 a.append(s)
for t in a:
 print(*sorted(map(int,t.split())))
Buggy code:
a=[]
import sys
for s in sys.stdin:
 s=s.split()
 if s=='0 0':break
 a.append(s)
for t in a:
 print(*sorted(map(int,t)))

Fixed code:
a=[]
import sys
for s in sys.stdin:
 if s=='0 0\n':break
 a.append(s)
for t in a:
 print(*sorted(map(int,t.split())))
Buggy code:
import sys
for n in sys.stdin:
 if n=='0 0':break
 print(*sorted(map(int,n.split())))

Fixed code:
import sys
for s in sys.stdin:
 if'0 0\n'==s:break
 print(*sorted(map(int,s.split())))
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:
import sys

while(True):
    x,y = map(int, sys.stdin.readline().split())
    if x==0 and y==0 :
        break
    elif x<y :
        print(x,y)
    elif x>y :
        print(y,x)

Fixed code:
import sys

while(True):
    x,y = map(int, sys.stdin.readline().split())
    if x==0 and y==0 :
        break
    elif x<=y :
        print(x,y)
    elif x>y :
        print(y,x)
Buggy code:
import sys
for xy in sys.stdin:
    x, y  = xy.split()
    i   if x == '0' and y == '0':
        break
    elif int(x) > int(y):
        x, y = y, x
    print('%s %s'%(x, y))

Fixed code:
import sys
for xy in sys.stdin:
    x, y  = xy.split()
    if x == '0' and y == '0':
        break
    elif int(x) > int(y):
        x, y = y, x
    print('%s %s'%(x, y))
Buggy code:
while True:
    x, y = map(int, inpu().split())
    if x == 0 and y == 0:
        break

    if x > y:
        z = x
        x = y
        y = z

    print(x, y)



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

    if (x==0) and (y==0):
        break
    
    print(x,y)
Buggy code:
def sort_two_numbers(a, b): 
    """ 
    a: int
    b: int
    returns a sorted list

    >>> sort_two_numbers(1, 3)
    [1, 3]
    >>> sort_two_numbers(3, 1)
    [1, 3]
    """
    result = []
    
    if a < b:
        result.append(a)
        result.append(b)
    else:
        result.append(b)
        result.append(a)

    return result

if __name__ == '__main__':
#    import doctest
#    doctest.testmod()

    while True:
        try:
            (a, b) = input().split(' ')
            print('{0[0]} {0[1]}'.format(sort_two_numbers(int(a), int(b))))
        except EOFError:
            break

Fixed code:
def sort_two_numbers(a, b):
    """
    a: int
    b: int
    returns a sorted list

    >>> sort_two_numbers(1, 3)
    [1, 3]
    >>> sort_two_numbers(3, 1)
    [1, 3]
    """
    result = []
    
    if a < b:
        result.append(a)
        result.append(b)
    else:
        result.append(b)
        result.append(a)

    return result

if __name__ == '__main__':
#    import doctest
#    doctest.testmod()

    while True:
        try:
            (a, b) = [int(i) for i in input().split(' ')]
            if a == 0 and b == 0:
                break
            print('{0[0]} {0[1]}'.format(sort_two_numbers(int(a), int(b))))
        except EOFError:
            break
Buggy code:
import sys

for i in sys.stdin:
    i = i.split(" ")
    x, y = int(i[0]), int(i[1])
    if x == y == 0:
       break
    elif x <= y:
       print("{0} {1}".format(x, y))
    else:
       pritn("{0} {1}".format(y, x))

Fixed code:
import sys
 
for i in sys.stdin:
    i = i.split(" ")
    x, y = int(i[0]), int(i[1])
    if x == y == 0:
       break
    elif x <= y:
       print("{0} {1}".format(x, y))
    else:
       print("{0} {1}".format(y, x))
Buggy code:
class DataSet:
    def __init__(self,x,y):
        self.x = x
        self.y = y

    def swap(self):
        temp = self.y
        self.y = self.x
        self.x = temp

def main():
    data = []
    while 1:
        # ????????????????????????????????????
        n = input().split()
        x = int(n[0])
        y = int(n[1])

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

        data.append(DataSet(x, y))

    length = len(data)
    what_large = length > 3000

    if what_large:
        print("Too Large")
    else:
        for i in range(len(data)):
            d_val = data[i]
            if d_val.x > d_val.y:
                d_val.swap()

            print("{0} {1} ".format(d_val.x,d_val.y))

if __name__ == '__main__':
    main()

Fixed code:
class DataSet:
    def __init__(self,x,y):
        self.x = x
        self.y = y

    def swap(self):
        temp = self.y
        self.y = self.x
        self.x = temp

def main():
    data = []
    while 1:
        # ????????????????????????????????????
        n = input().split()
        x = int(n[0])
        y = int(n[1])

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

        data.append(DataSet(x, y))

    length = len(data)
    what_large = length > 3000

    if what_large:
        print("Too Large")
    else:
        for i in range(len(data)):
            d_val = data[i]
            if d_val.x > d_val.y:
                d_val.swap()

            print("{0} {1}".format(d_val.x,d_val.y))

if __name__ == '__main__':
    main()
Buggy code:
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    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(b,a)
    else:
        print(a,b)
Buggy code:
while True:
  x,y = (int(x) for x in input().split())

  if x == 0 and y == 0:
    break
  if x > y:
    print (str(x) + " " + str(y))
  else:
    print (str(y) + " " + str(x))


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

  if x == 0 and y == 0:
    break
  if x < y:
    print (str(x) + " " + str(y))
  else:
    print (str(y) + " " + str(x))