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

Solution (Python):
import sys


def main():
    while True:
        x, y = [int(i) for i in sys.stdin.readline().split(' ')]
        if x == 0 and y == 0:
            break
        elif x <= y:
            print(x, y)
        else:
            print(y, x)


if __name__ == '__main__':
    main()

Solution (Python):

while True:
    x, y = map(int, input().split())
    
    if x == 0 and y == 0:
        exit()
    elif x < y:
        print(x, y)
    else:
        print(y, x)

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

Solution (Python):
v = 0
i = 0
a = []
b = []
while v == 0:
    x = input().split()
    if 0 == int(x[0]):
        if 0 == int(x[1]):
            v = 1
        else:
            a.append(int(x[0]))
            b.append(int(x[1]))
            i = int(i) + 1
        
    else:
        a.append(int(x[0]))
        b.append(int(x[1]))
        i = int(i) + 1
for j in range(int(i)):
    if a[j] < b[j]:
        pass
    else:
        c = a[j]
        a[j] = b[j]
        b[j] = c

for j in range(int(i)):
    print('%d %d' % (int(a[j]),int(b[j])))

Solution (Python):

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

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

Solution (Python):
while True:
    x = input()
    if x == '0 0':break
    print(*sorted(map(int,x.split())))

Solution (Python):
b = []
c = []
while True:
    inp = input()
    a = inp.split()
    a[0] = int(a[0])
    a[1] = int(a[1])
    if a[0] == 0 and a[1] == 0:
        break
    else:
        a.sort()
        b.append(a[0])
        c.append(a[1])
for i in range(len(b)):
    print(b[i],c[i])

Solution (Python):
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))

Solution (Python):
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())

Solution (Python):





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)

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):
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))

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

Solution (Python):
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)

Solution (Python):
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)

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

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

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

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

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

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

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

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

Solution (Python):
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))

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

Solution (Python):
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)

Solution (Python):
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)

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

Solution (Python):
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)

Solution (Python):
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()

Solution (Python):
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))

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

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

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

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):

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)

Solution (Python):

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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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))

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

Solution (Python):
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))

Solution (Python):
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=" ")

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

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

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

Solution (Python):

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

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

Solution (Python):
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)

Solution (Python):
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

Solution (Python):
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)

Solution (Python):
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)

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

Solution (Python):
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))

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

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

Solution (Python):
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)

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

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):

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)

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

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

Solution (Python):
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))

Solution (Python):
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))

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

Solution (Python):
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))

Solution (Python):
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)

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

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):

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

Solution (Python):
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))

for (i,j) in datalist:
    if i < j :
        print("{} {}".format(i, j))
    else:
        print("{} {}".format(j, i))

Solution (Python):
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)

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):

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

Solution (Python):
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)

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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)

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

Solution (Python):
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)

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

Solution (Python):
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))

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

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

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

Solution (Python):
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()

Solution (Python):
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

Solution (Python):
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

Solution (Python):
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))

Solution (Python):


import sys


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

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

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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))

Solution (Python):
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))

Solution (Python):
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))

Solution (Python):
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

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

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

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

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

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

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

Solution (Python):
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)

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

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

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

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

Solution (Python):
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

Solution (Python):
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()

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):

"""
Created on Fri Jan 30 18:47:21 2015

@author: hirose
"""



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}

Solution (Python):
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

Solution (Python):

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

Solution (Python):
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

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
while 1:
	x, y = map(int, raw_input().split())
	if x == 0 and y == 0:
		break
	if x > y:
		print "%d %d" % (y, x)
	else:
		print "%d %d" % (x, y)

Solution (Python):
def solve(a, b):
    if b < a:
        a, b = b, a
    print(a, b)

if __name__ == '__main__':
    while True:
        a, b = [int(i) for i in input().split()]
        if a == 0 and b == 0: break
        solve(a, b)

Solution (Python):



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)

Solution (Python):


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

Solution (Python):


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

Solution (Python):
while True:
	a,b = map(int,raw_input().split())
	if a == 0:
		if b==0:
			break
		elif b>0:
			print a,b
		else:
			print b,a
	elif a>=b:
		print b,a
	else:
		print a,b