Problem:


Swapping Two Numbers

  Write a program which reads two integers x and y, and prints them in ascending order. 

Input

The input consists of multiple datasets. Each dataset consists of two integers x and y separated by a single space.

The input ends with two 0 (when both x and y are zero). Your program should not process for these terminal symbols.
  

Output

For each dataset, print x and y in ascending order in a line. Put a single space between x and y.

Constraints

  
 0 ≤ x, y ≤ 10000

  
 the number of datasets ≤ 3000

Sample Input

3 2
2 2
5 3
0 0

Sample Output

2 3
2 2
3 5



Sample input:
3 2
2 2
5 3
0 0


Sample output:
2 3
2 2
3 5

Submission status: Accepted

Solution code:
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x<y:
        print(str(x)+" "+str(y))
    else:
        print(str(y)+" "+str(x))

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

while not(x==0 and y==0):
    if x>y:
        x,y = y,x
    print('{0} {1}'.format(x,y))
    x,y = map(int,input().split())

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
# ITP1_3_C


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)

Submission status: Accepted

Solution 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)]))

Submission status: Accepted

Solution code:
while 1:
    tmp = map(int, raw_input().split())
    if tmp[0] == tmp[1] == 0:
        break
    else:
        print " ".join(map(str, sorted(tmp)))

Submission status: Accepted

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

    print(*sorted([x, y]))

Submission status: Accepted

Solution code:
while(True):
    a, b = map(int, input().split())
    if(a == b == 0):
        break
    print('{} {}'.format(min(a, b), max(a, b)))

Submission status: Accepted

Solution code:
while True:
    a, b = sorted(map(int, input().split()))
    if a == 0 and b == 0:
        break
    print(a, b)

Submission status: Accepted

Solution code:

def check(lis):
    if lis[0] > lis[1]:
        return lis[::-1]
    else:
        return lis


while True:
    l = list(map(int, input().split()))
    if sum(l) == 0:
        break
    print(*check(l))

Submission status: Accepted

Solution code:
i = 0
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    if a > b:
        i = a; a = b; b = i
    print("{} {}".format(a, b))

Submission status: Accepted

Solution code:
import sys
for e in iter(sys.stdin.readline, '0 0\n'):
    print(*sorted(map(int, e.split())))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
while True:
    x=input().split()
    y=[int(x[0]),int(x[1])]
    if y[0]==0 and y[1]==0:
        break
    elif y[0]<y[1]:
        print("{} {}".format(y[0],y[1]))
    elif y[0]>y[1]:
        print("{} {}".format(y[1],y[0]))
    else:
        print("{} {}".format(y[0],y[1]))

Submission status: Accepted

Solution code:
while True:
    a, b = map(int, input().split())

    if (a == 0 and b == 0):
        break
    if a < b:
        print(f"{a} {b}")
    else:
        print(f"{b} {a}")

Submission status: Accepted

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

Submission status: Accepted

Solution 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}")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    x,y = map(int, input().split())
    if( x == 0 and y == 0):
        break
    if( x < y):
        print(f'{x} {y}')
    else:
        print(f'{y} {x}')

Submission status: Accepted

Solution code:
for i in range(0, 10001):
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        temp = int(x)
        x = y
        y = temp
    print(f'{x} {y}')

Submission status: Accepted

Solution code:
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        print(f"{y} {x}")
    elif x <= y:
        print(f"{x} {y}")

Submission status: Accepted

Solution code:
while True:
    a, b = map(int, input().split(" "))
    if a == b == 0:
        break
    if a > b:
        a, b = b, a
    print("%d %d" % (a,b))

Submission status: Accepted

Solution code:
f = "{} {}\n".format
open(1, 'w').writelines([f(*sorted(map(int, line.split()))) for line in open(0).readlines()][:-1])

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
while 1:
    x, y =map(int,input().split())
    if not x+y:break
    if x>y:x,y=y,x
    print(x,y)

Submission status: Accepted

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

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

    if x > y:
        print(y, x)
    else:
        print(x, y)

Submission status: Accepted

Solution code:
import sys

def solve():
    while True:
        x,y = map(int,input().split())
        if x == 0 and y == 0:
            break
        else:
            if x > y:
                x,y = y,x
            print(x,y)
    
solve()

Submission status: Accepted

Solution code:
for i in range(10000):
    x,y=map(int,input().split(" "))
    if x==0 and y==0:
        break
    elif x>y:
        x,y=y,x
    print(str(x)+" "+str(y))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

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

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

    print(x, y)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
from sys import stdin

while True:
    x, y = [int(x) for x in stdin.readline().rstrip().split()]
    if x == 0 and y == 0:
        break
    else:
        if x > y:
            print(y, x)
        else:
            print(x, y)

Submission status: Accepted

Solution code:
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x <= y:
        print(f'{x} {y}')
    else:
        print(f'{y} {x}')

Submission status: Accepted

Solution 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}')

Submission status: Accepted

Solution code:
i = 1
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    else:
        print(min(x,y), max(x,y))

Submission status: Accepted

Solution code:
i=1
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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        x, y = y, x
    print("%d %d" % (x, y))

Submission status: Accepted

Solution code:
while True:
    a=input()
    b=a.split()
    c=list()
    for d in b:
        c.append(int(d))
        
    if c[0]==0 and c[1]==0:
        break
    
    else:
        d=sorted(c)
        print(d[0],d[1])

Submission status: Accepted

Solution 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))

Submission status: Accepted

Solution code:
while(1):
    a,b = [int(i) for i in input().split()]
    if a == 0 and b == 0:
        break
    c = [a,b]
    c.sort()
    print(*c,sep=" ")

Submission status: Accepted

Solution code:
import sys
  
l = sys.stdin.readlines()

for i in l[:-1]:
    n = map(int,i.split())
    print(*sorted(n),sep=' ')

Submission status: Accepted

Solution code:
while True:
  a, b = map(int, input().split())
  if a == b == 0:
    break
  print(min(a,b), max(a, b))

Submission status: Accepted

Solution 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}")

Submission status: Accepted

Solution 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}')

Submission status: Accepted

Solution code:
for i in range(3000):
    string = input()
    numbers = string.split(' ')
    x, y = int(numbers[0]), int(numbers[1])
    if x == 0 and y == 0:
        break
    elif x < y:
        print(x, y)
    else:
        print(y, x)

Submission status: Accepted

Solution code:
i=1
while True:
    xy= [int(xy) for xy in input().split()]
    if xy[0]==xy[1]==0:
        break
    else:
        print('{0} {1}'.format(sorted(xy)[0],sorted(xy)[1]))
        i +=1

Submission status: Accepted

Solution code:
for i in range(3000):
  a = input().split()
  x = int(a[0])
  y = int(a[1])
  if x + y == 0:
    break
  elif x < y:
    print(x,y)
  elif y < x:
    print(y,x)
  else:
    print(x,y)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
while True:
    a,b=map(int,input().split())
    if a==b==0: break
    print('{} {}'.format(min(a,b),max(a,b)))

Submission status: Accepted

Solution 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))

Submission status: Accepted

Solution code:
while True:
    x,y=sorted([int(x) for x in input().split()])
    if (x,y)==(0,0): break
    print(x,y)

Submission status: Accepted

Solution code:
i=0
xArray=[]
yArray=[]
while True:
    x,y=(int(num) for num in input().split())
    if x==0 and y==0:
        break
    else:
        xArray.append(x)
        yArray.append(y)
        i+=1
for count in range(i):
    if xArray[count] < yArray[count]:
        print(xArray[count],yArray[count])
    else:
        print(yArray[count],xArray[count])

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
numListA = []
numListB = []

x = -1
y = -1
num = 0

while x != 0 or y != 0: 
    if x == -1:
        x, y = (int(a) for a in input().split())

    else:
        numListA = numListA + [x]
        numListB = numListB + [y]
        x, y = (int(a) for a in input().split())
        num += 1

for i in range(num):
    if(numListA[i] > numListB[i]):
        print("%d %d" % (numListB[i], numListA[i]))
    else:
        print("%d %d" % (numListA[i], numListB[i]))

Submission status: Accepted

Solution code:
cnt = 1
output = []
while True:
	data = input().split()
	if data[0] == '0' and data[1] == '0':
		break
	elif int(data[0]) > int(data[1]):
		output += [data[1] + " " + data[0]]
	else:
		output += [data[0] + " " + data[1]]
for line in output:
	print(line)

Submission status: Accepted

Solution code:
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        x, y = y, x
    print('{} {}'.format(x, y))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
a_list=[]
b_list=[]
while True:
  a,b = map(int, input().split())
  if a == 0 and b == 0: 
    break
  a_list.append(a)
  b_list.append(b)


  

for (alist, blist) in zip(a_list,b_list):
  if alist < blist:
    print(alist, blist)
  else:
    print(blist,alist)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
numbers_x = []
numbers_y = []
while True:
  x,y=map(int, input().split())
  if x==0 and y==0:
    break
  if x > y:
    x,y = y,x
  numbers_x.append(x)
  numbers_y.append(y)

for i in range(len(numbers_x)):
  print(numbers_x[i],numbers_y[i])

Submission status: Accepted

Solution code:
while True:
  x,y = map(int, input().split())
  if(x+y == 0):
    break
  
  if(x>y):
    print(y, x)
  else:
    print(x, y)

Submission status: Accepted

Solution code:
while True:
    x = input().split()
    a, b = int(x[0]), int(x[1])
    if a == 0 and b == 0:
        break
    if a > b:
        a, b = b, a
    print('%d %d' % (a, b))

Submission status: Accepted

Solution code:
for i in range(1,10000):
    a = list(map(int,input().split()))
    if a[0]+a[1] == 0:
        break
    a.sort()
    print("{0[0]} {0[1]}".format(a))

Submission status: Accepted

Solution code:
while True:
    a = list(map(int, input().split()))
    if a[0] == a[1] == 0:
        break
    print(min(a), max(a))

Submission status: Accepted

Solution code:
while True:
    a = input().split()
    x,y = int(a[0]),int(a[1])
    if x==0 and y==0:
        break
    elif x > y:
        print("%d %d" %(y,x))
    else:
        print("%d %d" %(x,y))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
while not x==y==0:
    print(min(x,y),max(x,y))
    x,y=map(int,input().split())

Submission status: Accepted

Solution code:
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x < y or x == y:
        print(str(x) + " " + str(y))
    else:
        print(str(y) + " " + str(x))

Submission status: Accepted

Solution code:
while 1:
  n,m=map(int,input().split())
  if n==0 and m==0:
    break
  if n<m:
    print(n,m)
  else:
    print(m,n)

Submission status: Accepted

Solution code:
for i in range(10000):
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    else:
        print(min(a,b), max(a,b))

Submission status: Accepted

Solution 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))

Submission status: Accepted

Solution 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))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    if a <= b:
        print(str(a) + " " + str(b))
    elif a > b:
        print(str(b) + " " + str(a))

Submission status: Accepted

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

    if x == 0 and y == 0: break
    
    elif x > y:
        print("%d %d" % (y, x))
    else:
        print("%d %d" % (x, y))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

nums = []

while True:
    num = [int(e) for e in input().split()]
    if num[0]==0 and num[1]==0:
        break
    nums.append(num)

for i in range(len(nums)):
    for j in range(len(nums[i])):
        for k in range(j):
            if nums[i][k] > nums[i][j]:
                a = nums[i][k]
                nums[i][k] = nums[i][j]
                nums[i][j] = a

for i in range(len(nums)):
    print(" ".join(map(str, nums[i])))

Submission status: Accepted

Solution code:
datalist = []
Flag = True
for i in range(3000):
    if Flag:
        x, y = map(int, input().split())
        if x == 0 and y == 0:
            Flag = False
        else:
            datalist.append((x, y))
#print(datalist)
for (i,j) in datalist:
    if i < j :
        print("{} {}".format(i, j))
    else:
        print("{} {}".format(j, i))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    else:
        print(min(x, y), max(x, y))

Submission status: Accepted

Solution code:
flag = "go"
while flag == "go":
    x, y = map(int, input().split())
    if x == y == 0:
        flag = "stop"
    else:
        if x < y:
            print(x,y)
        else:
            print(y,x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

while True:
    a, b = map(int, input().split())
    
    if (a == 0) & (b == 0):
        break
    
    if a < b:
        print(a, b)
    else:
        print(b, a)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
while True:
    n=input().split()
    n[0]=int(n[0])
    n[1]=int(n[1])
    if n[0]==0 and n[1]==0:
        break
 
    if n[0]>n[1]:
        c=n[0]
        n[0]=n[1]
        n[1]=c
    print(n[0],n[1])

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

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

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
from sys import stdin

while True:
    arr = [int(n) for n in stdin.readline().rstrip().split()]

    if arr[0] == arr[1] == 0:
        break

    arr.sort()
    print(arr[0], arr[1])

Submission status: Accepted

Solution code:
while True:
    a,b = map(int,input().split())
    if a ==0 and b ==0:
        break
    else:
        if a<=b:
            print(a,b)
        else:
            a,b =b,a
            print(a,b)

Submission status: Accepted

Solution 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)

Submission status: Accepted

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

    if x < y:
        print("{} {}".format(x, y))
    else:
        print("{} {}".format(y, x))

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution 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))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
c = 0

while True:
  a,b = map(int, input().split()); c+=1
  if a < b:
    print(a,b)
  elif a >b:
    print(b,a)
  elif a ==b and a !=0 and b!=0:
    print(a,b)
 
  elif a ==0 and b == 0: break

Submission status: Accepted

Solution code:
j=[]
while True:
    a,b=map(int,input().split())
    if a==b==0:break
    j.append(sorted([a,b]))

for i in range(len(j)):
    print('{0[0]} {0[1]}'.format(j[i]))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
def aizu006():
    while True:
        xs = map(int,raw_input().split())
        if xs[0] == 0 and xs[1] == 0: break
        else:
            xs.sort()
            for i in range(0,2):
                print xs[i],
            print
aizu006()

Submission status: Accepted

Solution code:
while True:
    a,b=map(int,raw_input().split())
    if a==0 and b==0:
        break
    else:
        if a<b:
            print a,b
        else:
            print b,a

Submission status: Accepted

Solution code:
while True:
    [a,b] = raw_input().split()
    a = int(a)
    b = int(b)
    if a == 0 and b == 0:
        break
    if a < b:
        print a,b
    else:
        print b,a

Submission status: Accepted

Solution code:
while True:
    x, y = map(int, raw_input().split())
    if x == 0 and y == 0:
        break
    elif x <= y:
        print("%d %d" % (x, y))
    elif x > y:
        print("%d %d" % (y, x))

Submission status: Accepted

Solution code:
# Python 3+
#-------------------------------------------------------------------------------
import sys

#ff = open("test.txt", "r")
ff = sys.stdin

while True :
    a, b = map(int, ff.readline().split())
    if (a == 0) & (b == 0) :
        break

    if a < b : print(a, b)
    else : print(b, a)

exit()

Submission status: Accepted

Solution code:
while 1:
    x,y=map(int,raw_input().split())
    if x==y==0: exit()
    else: print min(x,y),max(x,y)

Submission status: Accepted

Solution code:
while True:
	a = sorted(list(map(lambda x : int(x), input().split(" "))))
	if a[0] == 0 and a[1] == 0:
		break
	print("%d %d" % (a[0], a[1]))

Submission status: Accepted

Solution code:
while 1:
    m,n=[int(i) for i in raw_input().split() ]
    if m==n==0:
        break
    if m>n:
        print "%d %d" % (n,m)
    else :
        print "%d %d" % (m,n)

Submission status: Accepted

Solution code:
while 1 :
	a,b = map(int,raw_input().split())
	if not a and not b:
		break
	if a < b:
		print "%d %d" % (a , b)
	else :
		print "%d %d" % (b , a)

Submission status: Accepted

Solution code:
while True:
	a = map(int, raw_input().split(" "))
	if len([x for x in a if x <> 0]) <= 0:
		break
	else:
		a.sort()
		print " ".join(map(str, a))

Submission status: Accepted

Solution 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))

Submission status: Accepted

Solution code:
import sys
line = sys.stdin.readline()
n = []
while line:
 num = map(int,line.split())
 if num[0]==0 and num[1] == 0:
 	break;
 else:
 	if num[0] > num[1]:
 		tmp = num[0]
 		num[0] = num[1]
 		num[1] = tmp
 	s = str(num[0])+" "+str(num[1])
 	n.append(s)
 line = sys.stdin.readline()
for i in n:
 print i

Submission status: Accepted

Solution code:
while 1:
    a,b = sorted(map(int,raw_input().split()))
    if (not a) & (not b):
       break
    print ('{} {}'.format(a,b))

Submission status: Accepted

Solution code:
while 1:
    a,b = sorted(map(int,raw_input().split()))
    if a==b==0:
       break
    print ('{} {}'.format(a,b))

Submission status: Accepted

Solution code:
while 1:
    a,b = sorted(map(int,raw_input().split()))
    if a==b==0:
       break
    print '{} {}'.format(a,b)

Submission status: Accepted

Solution code:
while 1:
    a,b = sorted(map(int,raw_input().split()))
    if a==b==0:
       break
    print a,b

Submission status: Accepted

Solution code:
import sys
for line in sys.stdin:
    x, y = map(int, line.split())
    if x == y == 0:
        break
    else:
        print ' '.join(map(str, sorted([x, y])))

Submission status: Accepted

Solution code:
while 1:
    line = list(map(int, input().split()))
    if not any(line):
        break
    print(*sorted(line))

Submission status: Accepted

Solution code:
while True:
    x,y = map(int,raw_input().split())
    if x > y:
        print '%s %s' % (y,x)
    elif y > x:
        print '%s %s' % (x,y)
    elif x == 0 and y == 0:
        break
    else:
        print '%s %s' % (x,y)

Submission status: Accepted

Solution code:
while 1:
	s,t = map(int,input().split())
	if s>t:
		s,t = t,s
	if (s,t)==(0,0):
		break
	print(s,t)

Submission status: Accepted

Solution code:
import sys
for line in sys.stdin:
    xy = sorted(map(int , line.split()))
    if xy[0] == 0 and xy[1] == 0: break
    print(*xy)

Submission status: Accepted

Solution code:
while 1:
 x,y=sorted(map(int,raw_input().split()))
 if x==y==0:break
 print str(x)+" "+str(y)

Submission status: Accepted

Solution code:
while 1:
 x,y=sorted(map(int,raw_input().split()))
 if x==y==0:break
 print x,y

Submission status: Accepted

Solution code:
while 1:
	a, b = map(int, raw_input().split())
	if a == 0 and b == 0:
		break
	else:
		if a > b:
			print b, a
		else:
			print a, b

Submission status: Accepted

Solution code:
import sys

def main():
    for line in iter(sys.stdin.readline, ""):
        a = line.rstrip("\n").split(" ")
        b = []
        b.append(int(a[0]))
        b.append(int(a[1]))
        if (b[0] == 0 and b[1] == 0):
            return

        print(str(min(b)) + " " + str(max(b)))
     
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution 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))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 30 18:47:21 2015

@author: hirose
"""

#Repetitive Processing - Swapping Two Numbers

while 1:
    n = map(int, raw_input().split())
    x = n[0]
    y = n[1]
    
    if(x==0 and y==0):
        break
    
    if(x <= y):
        print '%(1)d %(2)d' %{'1':x, '2':y}
    else:
        print '%(1)d %(2)d' %{'1':y, '2':x}

Submission status: Accepted

Solution code:
while True:
	x,y=map(int, raw_input().split())
	if x==0 and y==0:
		break
	else:
		if x>=y:
			print y,x
		else:
			print x,y

Submission status: Accepted

Solution code:

while True:
    x,y = raw_input().split()
    x,y = map(int,(x,y))
    if x == 0 and y == 0:
        break
    if x > y:
        x,y = map(str,(x,y))
        print y + " " + x
    else:
        x,y = map(str,(x,y))
        print x + " " + y

Submission status: Accepted

Solution code:
c = 0
while True:
    a = input().split(' ')
    x = int(a[0])
    y = int(a[1])

    if (x or y) == 0:
        break;
    elif x < y:
        print(x,y)
    elif x > y:
        print(y,x)
    elif x == y:
        print(x,y)
    c += 1

Submission status: Accepted

Solution code:
while True:
    a,b=map(int, input().split())
    if a == 0 and b == 0:    break
    if a<b:    print("{} {}".format(a,b))
    else:    print("{} {}".format(b,a))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution 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:
        x, y = y, x
    print("%d %d" % (x, y))

Submission status: Accepted

Solution 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)