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):
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0: 
        break
    else:
        print(min(a,b),max(a,b))

Solution (Python):
while True:
    l = list(map(int, input().split()))
    if l == [0, 0]: break
    print(str(min(l)) + " " + str(max(l)))

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:
    a = list(map(int, input().split()))
    a.sort()
    if(a[0] == 0 and a[1] ==0):
        break
    print("%d %s" % (a[0], a[1]))

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:
    L=input().split( )
    x=int(L[0])
    y=int(L[1])
    if x==0 and y==0:break
    if x>y:
        print(f"{y} {x}")
    else:
        print(f"{x} {y}")

Solution (Python):


from collections import* 
from fractions import gcd
from functools import* 
from itertools import* 
from operator import mul
from bisect import* 
from heapq import* 
from math import factorial
from copy import deepcopy
import sys

sys.setrecursionlimit(10**6)


def main():
    *a,=map(int,open(0).read().split())
    a.pop()
    a.pop()
    for j in [sorted(a[i:i+2])for i in range(0,len(a),2)]:
        print(*j)
if __name__ == '__main__':
    main()

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

    if x == y == 0:
        break

    if   x <= y:
        print(f"{x} {y}")
    elif x > y:
        print(f"{y} {x}")
    else:
        raise ValueError(x, y)

Solution (Python):
num=1
while True:
	x,y=map(int,input().split())
	if x==0 and y==0:break
	list=[x,y]
	print(' '.join(map(str,sorted(list))))
	num += 1

Solution (Python):
r=[]
while 1:
    a=sorted([int(i) for i in input().split()])
    if a!=[0,0]:
        r.extend([a])
    else:
        break
[print("{} {}".format(i[0],i[1])) for i in r]

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
    if x > y:
        print(y, x)
    else:
        print(x, y)

Solution (Python):
for i in range(0, 10000):
    num = input().split(" ")
    
    x = int(num[0])
    y = int(num[1])
    if x == 0 and y == 0:
        break
    if x > y:
        print("{1} {0}".format(x, y))
    else:
        print("{0} {1}".format(x, y))

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):
while 1:
    a,b=map(int,input().split())
    if a==0 and b==0 : break
    if a>b: a,b=b,a
    print(a,b)

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
    if x > y:
        print("{} {}".format(y, x))
    else:
        print("{} {}".format(x, y))

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

Solution (Python):
count_val = 1
list1 = []
while True:
    input_x, input_y = list(map(int, input().split()))
    if input_x == input_y == 0:
        break
    else:
        list1.append(input_x)
        list1.append(input_y)
        joined_list1 = " ".join(map(str, sorted(list1)))
        print(joined_list1)
        del list1[:]
exit()

Solution (Python):


while True:
    x,y=(int(a) for a in input().split())
    if x==0 and y==0:
        break;
    elif x>y :
        print("{} {}".format(y,x))
    else :
        print("{} {}".format(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 == 0 and b == 0:
    break
  if a > b:
    a,b = b,a
  print(a,b)

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

Solution (Python):
for i in range(100000):
    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):
i = 1
while True:
  a,b = map(int, input().split())
   
  if a>b:
    x = a
    a = b
    b = x
     
  if a == 0 and b ==0:
    break
   
  print(a, + b)

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

Solution (Python):
i = 1
while True:
  a,b = map(int, input().split())
  
  if a>b:
    x = a
    a = b
    b = x
    
  if a == 0 and b ==0:
    break
  
  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:
  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:
  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:
  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:
  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:
  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:
  x, y = map(int, input().split())
  if x > y:
    x,y = y,x
  if x ==0 and y == 0:
    break
  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:
  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:
    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:
    nums = list(map(int, input().split()))
    
    if nums[0] == nums[1] == 0:
        break;
    if nums[0] > nums[1]:
        temp = nums[0]
        nums[0] = nums[1]
        nums[1] = temp
        
    print(nums[0], nums[1])

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

Solution (Python):
while 1:
  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):
a,b=map(int,input().split())
while a!=0 or b!=0:
    if a>=b:
        print(str(b)+' '+str(a))
    else:
        print(str(a)+' '+str(b))
    a,b=map(int,input().split())

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:
    a,b=map(int, input().split())
    if (a+b)==0: break
    if a>b: a,b=b,a
    print(a,b)

Solution (Python):
for _ in range(3000):
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    print(min(x, y), max(x, y))

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:
    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:
    a,b =map(int,input().split())
   
    if a==0 and b ==0:break
    if a<=b: print(a,b)
    if a>b: print(b,a)

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
    if x > y:
        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
    if x > y:
        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
    if x > y:
        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
    if x > y:
        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
    if x <= y:
        print(str(x) + ' ' + str(y))
    else:
        print(str(y) + ' ' + str(x))

Solution (Python):

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)

Solution (Python):
while 1:
    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:
    l = list(map(int, input().split()))
    l.sort()
    x = l[0]
    y = l[1]
    if(x == 0 and y == 0):
        break
    print(str(x)+" "+str(y))

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

Solution (Python):
def main():
    while True:
        
        args = input().split(' ')
        if int(args[0]) == 0 and int(args[1]) == 0:
            break
        else:
            if int(args[0]) > int(args[1]):
                print('{} {}'.format(args[1], args[0]))
            else:
                print('{} {}'.format(args[0], args[1]))


if __name__ == "__main__":
    main()

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

Solution (Python):
L=list(map(int,input().split()))
L.sort()
t = 0
while not ( L[0] == 0 and L[1] == 0 ):
	
	print("{} {}".format( str(L[0]), str(L[1]) ) )
	t+=1
	L=list(map(int,input().split()))
	L.sort()

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):
l=input().split()
x,y=int(l[0]),int(l[1])
while x != 0 or y != 0:
	if x>y:
		x,y=y,x
	print(x,y)
	l=input().split()
	x,y=int(l[0]),int(l[1])

Solution (Python):
if __name__ == '__main__':
	d = [int(s) for s in input().split()]
	while d[0] + d[1] != 0:
		d.sort()
		print(str(d[0])+" "+str(d[1]))
		d = [int(s) for s in input().split()]

Solution (Python):
while True:
    x = input()
    x = x.split(" ")
    a = int(x[0])
    b = int(x[1])
    
    if(a==0 and b == 0):
        break
    
    if(a > b):
        x[0] = b
        x[1] = a
        
    
        
    print("{} {}".format(x[0],x[1]))

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

Solution (Python):





class math:
    
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)







while True:
    temp = input()
    A, B = [int(x) for x in temp.split()]
    if A == 0 and B == 0:
        break
    if A > B :
        print(B,A)
    else:
        print(A,B)

Solution (Python):
def order_ascend(a, b):
    if  a > b:
        a, b = b, a
    return a, b

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

Solution (Python):
while True:	
	l=list(map(int,input().split()))
	if l[0]==0 and l[1]==0:
		break
	else:
		l.sort()
		print(str(l[0])+' '+str(l[1]))

Solution (Python):
i = 0
while i < 3000:
    a,b = map(int,input().split())
    if a == 0 and b ==0:
        break
    if a > b:
        tmp = a
        a=b
        b=tmp
    print(f"{a} {b}")
    i += 1

Solution (Python):
while True:
    data = input().split()
    a = int(data[0])
    b = int(data[1])
    if a == 0 and b == 0:
        break
    if a > b:
        change = a
        a = b
        b = change
    print(a, b)

Solution (Python):
a = []
b = []
i = 0
while i < 3000:
    c,d = map(int, input().split())
    if c == 0 and d == 0:
        break
    elif c < d:
        a.append(c)
        b.append(d)
    else:
        a.append(d)
        b.append(c)
for j in range(len(a)):
    print(a[j],b[j])

Solution (Python):
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)
        else:
            print(x,y)

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

Solution (Python):
while True:
    line = input()
    data = line.split()
    x = int(data[0])
    y = int(data[1])
    if x==0 and y==0:
        break

    if x <= y:
        print(str(x) + " " + str(y))
    elif x > y:
        print(str(y) + " " + str(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)
    else :
        print(x,y)

Solution (Python):
import sys
for s in sys.stdin:
    x, y = map(int, s.split())
    if x == y == 0: break
    print(f'{x} {y}' if x < y else f'{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
    liste=[x,y]
    liste.sort()
    print(liste[0],liste[1])

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

Solution (Python):
while True:
    a = input()
    list = a.split()
    [x, y] = list
    x = int(x)
    y = int(y)
    list = [x, y]
    list.sort()
    [x, y] = list
    
    if x == 0 and y == 0:
        break
    else:
        x = str(x)
        y = str(y)
        k = " "
        ans = x + k + y
        print(ans)
        continue

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

Solution (Python):
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq
import itertools
import operator



inf = float('inf')
N = 0


def set_inputs():
    global N
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    
    while True:
        x, y = get_li()
        if x == y == 0:
            break
        print(min(x, y), max(x, y))
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    main()

Solution (Python):
def getN():
    return int(input())

def getlist():
    return list(map(int, input().split()))

while(True):
    lis = getlist()
    if lis == [0,0]:
        break
    else:
        print(" ".join(map(str, sorted(lis))))

Solution (Python):
nums = list(map(int, input().split()))
while nums != [0, 0]:
    nums.sort()
    print(nums[0], nums[1])
    nums = list(map(int, input().split()))

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):
i = 1
while True:
  a, b = map(int, input().split())
  i += 1
  if a == 0 and b == 0:
    break
  elif a > b:
    a, b = b, a
  print(a,b)

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

Solution (Python):
while True:
    a, b = map(int, input().split(' '))
    ans = [[a, b], [b, a]][a>b]
    if a == b == 0:
        break
    else:
        print(*ans)

Solution (Python):
flag = True
while flag == True:
    numbers = [int(i) for i in input().split()]
    x = numbers[0]
    y = numbers[1]
    if x == 0 and y == 0:
        flag == False
        break
    elif x > y :
        print(y, x)
    else :
        print(x, y)

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

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

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

while (x != 0 or y != 0):
    if (x > y):
        p = x
        x = y
        y = p
    print(x, y)
    x, y = map(int, input().split())

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:
        print(y, x)
    else:
        print(x, y)

Solution (Python):
while 1:
    data=list(map(int,input().split()))
    if data[0]==0 and data[1]==0: break
    if data[0]>data[1]:print(data[1],data[0])
    else: print(data[0],data[1])

Solution (Python):



while 1:
	d = list(map(int, input().split()))
	if d[0] == d[1] == 0:
		break
	else:
		print("{0[0]} {0[1]}".format(sorted(d)))

Solution (Python):




















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

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

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

Solution (Python):
while True:
    data = input().split()
    a = int(data[0])
    b = int(data[1])
    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 and 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:
		x, y = y, x
	print(x, y)

Solution (Python):
for i in range(100000):
    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):
x = []
y = []
while True:
    x1,y1 = map(int,input().split())
    if (x1 == 0)*(y1 ==0) :
        break
    x.append(x1)
    y.append(y1)

for i in range(len(x)):
    if x[i]>y[i]:
        print(y[i],x[i])
    else:
        print(x[i],y[i])

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

Solution (Python):
while True:
    a, b = map(int, input().split(' '))
    min_ab = 0
    max_ab = 0
    if a == 0 and b == 0:
        break
    else:
        min_ab = min(a, b)
        max_ab = max(a, b)
    print(str(min_ab) + ' ' + str(max_ab))

Solution (Python):
c = 0
while c < 3000:
    i = input()
    a,b = list(map(int,i.split()))
    if a == 0 and b == 0:
        break
    elif a <= b:
        print(a,b)
    else:
        print(b,a)
    c += 1

Solution (Python):
while True:
    x = list(map(int, input().split()))
    if x[0] == 0 and x[1] == 0:
        break
    else:
        if x[0] < x[1]:
            print(x[0],x[1])
        else:
            print(x[1],x[0])

Solution (Python):
while True:
    a = [int(x) for x in input().split()]
    if a[0] == 0 and a[1] == 0:
        break
    print(' '.join(map(str, sorted(a))))

Solution (Python):
while 1:
    a,b = map(int,input().split())
    if a==0 and b==0:
        break
    list = [a,b]
    list.sort()
    print(*list)

Solution (Python):





if __name__ == '__main__':
    while 1:
        line = raw_input()
        if line == '0 0':
            break
        a, b = map(int, line.split())
        if a < b:
            print a, b
        else:
            print b, a

Solution (Python):
while True:
    i = list(map(int, input().split()))
    if i[0] == 0 and i[1] == 0:
        break
    else:
        if i[0] > i[1]:
            print(i[1], i[0])
        else:
            print(i[0], i[1])

Solution (Python):
count = 0;
while True:
    if count == 3000:
        break
    i = list(map(int,input().split()))
    x = i[0]
    y = i[1]
    if x == 0 and y == 0:
        break
    if x < y:
        print(x, y)
    if y < x:
        print(y, x)
    if x == y:
        print(x, y)
    count+= 1

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

Solution (Python):
while True:
    a, b= 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:
    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):
i = 1
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)
	i = i+1

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

Solution (Python):
while 1:
        A,B = map(int,input().split())
        if A == 0 and B == 0:break
        if A > B :A ,B = B ,A
        print('%d %d' % (A ,B))

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

Solution (Python):
while True:
    a = input().split(' ')
    for i in range(len(a)):
        a[i] = int(a[i])
    if a[0] == 0 and a[1] == 0:break
    if a[0] < a[1]:
        print(str(a[0])+' '+str(a[1]))
    else:
        print(str(a[1])+' '+str(a[0]))

Solution (Python):
while True:
    X, Y = [int(_) for _ in input().split()]
    if X == Y == 0:
        exit()
    else:
        print(*sorted([X, Y]))

Solution (Python):
while ...:
    x, y = map(int, input().split())
    if not (x or y): break
    print(*sorted([x, y]))

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:
    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):
a = []
b = []

while True:
    n, m = map(int, input().split())
    if n == 0 and m == 0:
        break
    elif n >= m:
        a.append(m)
        b.append(n)
    else:
        a.append(n)
        b.append(m)
for i in range(len(a)):
    print(a[i], b[i])

Solution (Python):
a, b = map(int, input().split())
while a != 0 or b != 0:
    moji = str(a)+' '+str(b) if a < b else str(b)+' '+str(a)
    print(moji)
    a, b = map(int, input().split())

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

Solution (Python):
while 1:
    input_line = input()
    input_list = input_line.split()
    
    x = int(input_list[0])
    y = int(input_list[1])
    
    if x == 0 and y == 0 :
        break
    if x > y:
        print(str(y)+" "+str(x))
    else :
        print(str(x)+" "+str(y))

Solution (Python):

for i in range(3000):
    line = input().rstrip().split()
    a = int(line[0])
    b = int(line[1])
    if (a == 0 and b == 0):
        break
    if (b < a):
        a,b = b,a
    print(str(a) + " " + str(b))

Solution (Python):
while True:
    nums = list(map(int, input().split()))
    if sum(nums):
        print(' '.join(map(str, sorted(nums))))
    else:
        break

Solution (Python):
num = []
x = []
y = []
for a in range(3000):
    w = sorted(map(int,input().split()))
    if w[0] == 0 and w[1] == 0:
        break
    x += [w[0]]
    y += [w[1]]
    num.append(w)
for i in range(len(num)):
    print(str(x[i]),str(y[i]))

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

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):
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):
for i in range(10000):
  a, b=map(int, input().split())
  if a+b==0:
    break
  else:
    if a>b:
      print(b, a)
    else:
      print(a, b)

Solution (Python):
is_zero = False
while not is_zero:
    list = input().split(' ')
    x = int(list[0])
    y = int(list[1])
    if x == 0 and y == 0:
        is_zero = True
    else:
        if x < y:
            print(f'{x} {y}')
        else:
            print(f'{y} {x}')

Solution (Python):
while True:
    list = input().split()
    a = int(list[0])
    b = int(list[1])
    if a == 0 and b == 0:
        break
    if a > b:
        a, b = b, a
    print(a, b)

Solution (Python):
while True:
    x, y = map(int, 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 = map(int, input().split())
    if x == 0 and y == 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 == 0 and y == 0:
        break
    if x > y:
        x,y = y,x
    print("%d %d" %(x,y))

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


main()

Solution (Python):
num1, num2 = input().split()
while int(num1) + int(num2) > 0:
	if int(num1) >= int(num2):
		print(num2, num1, sep=' ')
	else:
		print(num1, num2, sep=' ')
	num1, num2 = input().split()

Solution (Python):
import sys

for line in sys.stdin:
    x, y = map(int, line.split())
    if x == y == 0:
        break
    if (x > y):
        x, y = y, x
    print(x, y)

Solution (Python):
while True:
        a=input()
        b=a.split()
        x=int(b[0])
        y=int(b[1])
        if x==0 and y==0:
                break
        elif x>y:
                print(y,x)
        elif x<=y:
                print(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)
        else:
            print(x,y)

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

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

Solution (Python):
x, y = map(int, input().split())
while x != 0 or y != 0:
	if x > y:
		print(y, x)
	else:
		print(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(x,y)
    else:
        print(y,x)

Solution (Python):

while True:
    arr = list(map(int,input().split()))
    if arr == [0,0]:
        break
    elif arr[0]>arr[1]:
        temp = arr[0]
        arr[0]=arr[1]
        arr[1]=temp
    print(arr[0],arr[1])

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)