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):
A=[]
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    else:
        A.append([min(x,y),max(x,y)])

for a in A:
    print(a[0],a[1])

Solution (Python):
from math import sqrt
def main():
    ins=[]
    x=0
    y=0
    while True:
        x,y=map(int,input().split())
        if x==0 and y==0:
            break
        if x<y:
            ins.append(f"{x} {y}")
        else:
            ins.append(f"{y} {x}")
    for i in range(len(ins)):
        print(ins[i])
    return 0
if __name__ == "__main__":
    main()

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 = (int(i) for i in input().split())
    if x == y == 0:
       break
    elif x <= y:
        print(x, y)
    elif y <= x:   
        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:
    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:
        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("{} {}" .format(x,y))

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

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

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

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

Solution (Python):
def check_num(x, y):
    if x > y:
        print(f'{y} {x}')
    else:
        print(f'{x} {y}')

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

Solution (Python):
while True:
 x,y = (int(x) for x in 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 = (int(x) for x in input().split())

    if x == 0 and y == 0:
        break
    
    if x < y:
        print(x, y)
    else:
        print(y, x)

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

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

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

Solution (Python):
a=0
while(a<=10000):
    a+=1
    x,y=map(int,input().split())
    if(x>y):
        print(str(y)+" "+str(x))
    elif(x==0 and y==0):
        break
    else:
        print(str(x)+" "+str(y))

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

Solution (Python):
ai = []
while True:
    q = list(map(int,input().split()))
    if sum(q) == 0:
        break
    ai.append(q)
    
for i in range(len(ai)):
    if ai[i][0] > ai[i][1]:
        print(ai[i][1],ai[i][0])
    else:
        print(ai[i][0],ai[i][1])

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):
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 == 0 and b == 0:
        break
    elif a >= b:
        print(b, a)
    elif a < b:
        print(a, b)

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

Solution (Python):
def getSortedInput():
    s = list(map(int, input().split()))
    s.sort()
    return s

s = getSortedInput()
while s[0] != 0 or s[1] != 0:
    print(' '.join(map(str,s)))
    s = getSortedInput()

Solution (Python):
def sample():
    while True:
        a, b = input().split(" ")
        a, b = sorted([int(a), int(b)])
        if a == b == 0: break
        print(f"{a} {b}")

sample()

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

Solution (Python):
for i in range (10000):
    a, b = map(int, input().split())
    if a==0 and b==0:
        break
    elif 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)
    else:
        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):
pairs = []
while True:
    a, b = map(int,input().split())
    if (a, b) == (0, 0):
        break
    else:
        pairs.append([a, b])
for pair in pairs:
    pair.sort()
    print(*pair)

Solution (Python):

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

Solution (Python):
l=[]
while True:
  e = list(map(int,input().split()))
  if e==[0, 0]:
    break
  e.sort()
  l.append(e)

for ele in l:
  print(str(ele[0]) +" "+str(ele[1]))

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

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

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

Solution (Python):
for i in range(10000):
    a = list(map(int,input().split()))
    if a[0] == a[1] == 0:
        exit()
    if a[0] > a[1]:
        a[0],a[1] = a[1],a[0]
    print(a[0],a[1])

Solution (Python):
i=1
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)
    i+=1

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

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):
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 = input().split()
    x, y = int(x), int(y)
    if x == 0 and y == 0:
        break
    else:
      if x < y:
        print("{} {}".format(x, y))
      else:
        print("{} {}".format(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=sorted(map(int,input().split()))
	if (x==0) and(y==0):
		break
	print(x, y)

Solution (Python):




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


if __name__ == '__main__':
    main()

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

Solution (Python):
for i in range(1, 3001):
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    else:
        print('%d %d' % (min(x, y), max(x, y)))

Solution (Python):
nsets = []
nset = []

while True:
    nset = list(map(int, input().split()))
    if nset[0] == 0 and nset[1] == 0:
        break
    nsets.append(nset)
    nset = []

for i in range(len(nsets)):
    nums = nsets[i]
    if nums[0] > nums[1]:
        print("{} {}" .format(nums[1], nums[0]))
    else:
        print("{} {}" .format(nums[0], nums[1]))

Solution (Python):
a=[]
while True:
    a.append(list(map(int,input().split(" "))))
    if a[-1]==[0,0]:
        break
a=a[:-1]
for i in a:
    print(str(min(i))+" "+str(max(i)))

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):
for i in range(3000):
    x,y = map(int,input().split())
    if x==y==0:
        break
    if x>y:
        x,y = y,x
    print(f"{x} {y}")

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

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

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):
for i in range(3000):
  x,y=(int(a) for a in 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:
		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:
        print(y,x)
    else:
        print(x,y)

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

Solution (Python):
import sys
for l in sys.stdin:
	a, b = map(int, l.split())
	if a == 0 and b == 0:
		break
	print(min(a,b),max(a,b))

Solution (Python):


i = 1
while True:
    x,y = (int(x) for x in input().split())
    if (x == 0 and y == 0):
        exit()

    else :
            list = [0, 0]
            list[0] = x
            list[1] = y
            list.sort()
            print (list[0],list[1])
            i += 1

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

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

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

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

Solution (Python):
XS = list(map(int, open(0).read().split()))
for i in range(0, len(XS), 2):
    a = XS[i]
    b = XS[i+1]
    if a == 0 and b == 0:
        break
    if a < b:
        print("{} {}".format(a, b))
    else:
        print("{} {}".format(b, a))

Solution (Python):
while 1 :
    lst=list(map(int,input().split()))
    if lst==[0,0] : break
    lst.sort()
    print("{} {}".format(lst[0],lst[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 == 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
    print(f"{x} {y}" if y > x else f"{y} {x}")

Solution (Python):
for i in range(3000):
    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
    else:
        if x>=y:
            print(f"{y} {x}")
        if x<y:
            print(f"{x} {y}")

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

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

Solution (Python):
ls = []
n = 0
while 1:
    ls1 = list(map(int,input().split()))
    
    if ls1[0] == 0 and ls1[1] == 0:
        break
    else:
        ls1.sort()
        ls.append(list(ls1))
        
        ls1.clear()
        


for i in range(len(ls)):
    print(ls[i][0],ls[i][1])

Solution (Python):
while True:
    a,b=input().split()
    a=int(a)
    b=int(b)
    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
    A = min(x,y)
    B = max(x,y)
    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:
        print(y,x)
    else:
        print(x,y)

Solution (Python):
c = 0
while True:
	x, y = map(int, input().split())
	c += 1
	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 == y == 0:
    break
  elif x >= y:
    print(f'{y} {x}')
  else:
    print(f'{x} {y}')

Solution (Python):
s = input().split()
a,b = int(s[0]),int(s[1])
while not(a == 0 and b == 0):
    if(a<b):
        print(a,b)
    else:
        print(b,a)
    s = input().split()
    a,b = int(s[0]),int(s[1])

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):
i = 0
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 :
        print(a, b)
    else:
        print(b, a)

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

Solution (Python):
for i in range(3000):
    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,b = [int(x) for x in input().split()]
    if a == 0 and b == 0:
        break
    else:
        if a <= b:
            print(a,b)
        elif a > b:
            print(b,a)

Solution (Python):
while True:
    num = input().split(" ")

    x = int(num[0])
    y = int(num[1])

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

    if x > y:
        tmp = x
        x = y
        y = tmp

    print("%d %d" % (x, y))

Solution (Python):
deta = []
while True :
    l = map(int, input().split())
    a, b = l
    if a == 0 and b == 0 :
        break
    deta.append([a, b])

for i in deta :
    i.sort()
    print(*i)

Solution (Python):
import sys


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


resolve()

Solution (Python):
for i in range(3000):
    x, y = map(int, input().split())
    if x ==0 and y == 0:
        break
    elif x > y:
        print(f'{y} {x}')
    else:
        print(f'{x} {y}')

Solution (Python):
import sys
input = sys.stdin.readline

while True:
    x,y = [int(i) for i in input().strip().split()]
    if x or y:
        print(" ".join([str(i) for i in sorted([x,y])]))
    else:
        break

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

Solution (Python):
while True:
    i,j=input().split()
    i=int(i)
    j=int(j)
    if i==0 and j==0:
        break
    if i>j:
        print(j,i)
    elif i<j:
        print(i,j)
    else:
        print(i,i)

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):
flag=True
while flag:
  a,b=map(int,input().split(' '))
  if a==0 and b==0:
    flag=False
  elif a>b:
    print('{} {}'.format(b,a))
  else: 
    print('{} {}'.format(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:
        print(y,x)
    else:
        print(x,y)

Solution (Python):
L = []
i = 0
while True:
  x, y = list(map(int, input().split(' ')))
  if x == 0 and y == 0:
    break
  if x < y:
    L.append([x, y])
  else:
    L.append([y, x])
for n in L:
  print(*n)

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

Solution (Python):
while True:
  num = list(map(int,input().split()))
  if num[0] == 0 and num[1] == 0:
    break
  print(*sorted(num))

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)
0 <= x, y <= 10000

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

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

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

Solution (Python):
while True:
    x,y = map(int, input().split())
    if x == 0 and y == 0:
        break
    numbers = sorted([x,y])
    print(f"{numbers[0]} {numbers[1]}")

Solution (Python):

while True:
  val1, val2 = map(int, input().split())
  if val1 == 0 and val2==0:
    break
  else:
    if val2 < val1:
      val1, val2 = val2, val1
    print(val1,val2)

Solution (Python):
while True:
    a, b=map(int, input().split())
    if a==0 and b==0:
        break
    elif a > b:
        c=a
        a=b
        b=c
        print(a, b)
    else:
        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(str(y) + ' ' + str(x))
        else:
            print(str(x) + ' ' + str(y))
        continue

Solution (Python):
for i in range(1, 3005):
    x = input().split(" ")
    a = int(x[0])
    b = int(x[1])
    if a + b == 0:
        break
    if a < b:
        print(str(a) + " " + str(b))
    else:
        print(str(b) + " " + str(a))

Solution (Python):
x,y=map(int,input().split())
while not (x==0 and y==0):
    if (x>y):
        print(str(y)+" "+str(x))
    elif (x<y):
        print(str(x)+" "+str(y))
    else:
        print(str(x)+" "+str(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:
        x,y = y,x
    print("%d %d" %(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):
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):
f = "{} {}\n".format
open(1, 'w').writelines([f(*sorted(map(int, line.split()))) for line in open(0).readlines()][:-1])

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

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

Solution (Python):
a = 0
b = 0
inp = []

i = 0
j = 0

while True:
    inp.append(list(map(int, input().split())))
    if inp[i][0] == 0 and inp[i][1] == 0:
        break

    i += 1

for j in range(i):
    if inp[j][0] <= inp[j][1]:
        print("%s %s" % (inp[j][0], inp[j][1]))
    else:
        print("%s %s" % (inp[j][1], inp[j][0]))

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)

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):
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
    elif a > b:
        print(b, a)
    else:
        print(a, b)

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

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 = list(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
    if a > b:
        print(b, a)
    else:
        print(a, b)

Solution (Python):
x = []

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


def main():
    number_list=[]
    while True:
        x,y=map(int,input().split())
        if x==0 and y==0:
            break
        else:
            number_list.append([x,y])
    for number in number_list:
        if number[0]<number[1]:
            print("{} {}".format(number[0],number[1]))
        else:
            print("{} {}".format(number[1],number[0]))

if __name__=="__main__":
    main()

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

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

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

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

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

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

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

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