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

Solution (Python):
x = 1
y = 1
while x != 0 or y != 0:
    l = list(map(int,input().split()))

    x = l[0]
    y = l[1]

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

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

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

Solution (Python):

i = 0
f = 0
while True:
    x,y = map(int,input().split())
    i +=1
    if x == y == 0:
        break
    else:
        if x<y:
            print(f"{x} {y}")
        else:
            print(f"{y} {x}")

Solution (Python):
def main():
    x, y = (int(i) for i in input().split())
    while x != 0 or y != 0:
        if x > y:
            x, y = y, x
        print(x,y)
        x, y = (int(i) for i in input().split())

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys

while True:
  x,y=list(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 ==0 :
    exit()
  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)
    elif y < x:
        print(x,y)
    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("{} {}".format(b,a))
    else:
        print("{} {}".format(a,b))

Solution (Python):
i = 1
a = []
b = []

while True :
    x, y = map(int, input().split())
    if x == 0 and y == 0 :
        break
    a.append(x)
    b.append(y)
    i += 1
    
for j in range(1, i) :
    if a[j - 1] < b[j - 1] :
        print(a[j - 1], b[j - 1])
    else :
        print(b[j - 1], a[j - 1])

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

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

Solution (Python):
while True :
    n = input().split()
    x = int(n[0])
    y = int(n[1])
    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:
    xylist = []
    xylist = list(map(int, input().split()))
    if xylist[0] == xylist[1] == 0:
        break
    else:
        print(*sorted(xylist))

Solution (Python):
x, y = map(int, input().split())
while x != 0 or y != 0 :
    if x > y :
        x = x + y
        y = x - y
        x = x - y
    print(x,y)
    x, y = map(int, input().split())

Solution (Python):
for i in range (3000):
    x, y = map(int, input().split(" "))
    if x == y == 0:
        break
    elif x >= y:
        print(y, x)
    elif x < y:
        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:
    try:
        nums = [int(e) for e in input().split()]
        if nums[0] == 0 and nums[1] == 0:break
        nums.sort()
        print(str(nums[0]) + " " + str(nums[1]))
    except EOFError:
        break

Solution (Python):
while True:
    x, y = (int(a) for a in input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        tmp = x
        x = y
        y = tmp
    print(str(x) + ' ' + str(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):
while True:
    li = list( map( int, input().split() ) )
    
    if(li[0] == 0 and li[1] == 0):
        break
    
    li.sort()
    print(li[0], li[1])

Solution (Python):
while True:
    nums = input()
    a, b = map(int, nums.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 == 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):
ans=[]
while 1:
    a,b=map(int,input().split())
    if a==0 and b==0:break
    if a>=b:a,b=b,a
    ans.append((a,b))

for x,y in ans:
    print(x,y)

Solution (Python):

while True:
    a, b = input().split()
    a, b = eval(a), eval(b)
    if a == 0 and b == 0:
        break
    if a > b:
        print(str(b) + " " + str(a))
    else:
        print(str(a) + " " + str(b))

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

Solution (Python):
i_list = []
while True:
    i_list.append(list(map(int, input().split())))
    if i_list[-1][0] == i_list[-1][1] == 0:
        break

for i in range(len(i_list)-1):
	i_list[i].sort()
	print(*i_list[i])

Solution (Python):
li = [int(i) for i in input().split()]
while any(li):
    print(*sorted(li))
    li = [int(i) for i in input().split()]

Solution (Python):
import sys

while True:
    x, y = [int(i) for i in input().split()]
    if x == 0 and y == 0:
        sys.exit()
    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:
        a, b = b, a
    print(a, b)

Solution (Python):
l=list(map(int,input().split()))
while l!=[0,0]:
    print(min(l),max(l))
    l=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:
       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("%d %d" % (x, y))
    else:
        print("%d %d" % (y, x))

Solution (Python):
x = 0

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

Solution (Python):
A = []
while True:
    a, b = map(int, input().split())
    if a == b == 0:
        break
    else:
        B = []
        B.append(a)
        B.append(b)
        A.append(B)
        
for i in A:
    i.sort()
    print("{} {}".format(i[0],i[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:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    
    if a >= b:
        print(str(b) + " " + str(a))
    else:
        print(str(a) + " " + str(b))

Solution (Python):

a =[]
while True:
    x, y = (int(x) for x in input().split())
    if x == 0 and y ==0:
        break
    z = [x, y]
    z.sort()
    z = [z]
    a = a + z
for i in range(len(a)):
    print(str(a[i][0]) + ' ' + str(a[i][1]))

Solution (Python):
def main():
    a = list(map(int,input().split()))
    a.sort()
    if a[0] == 0 and a[1] == 0:
        return False
    print(f"{a[0]} {a[1]}")
    return True

while main():
    pass

Solution (Python):
li = []
for i in range(0, 3000):
    buf = list(map(int, input().split(' ')))
    if buf[0] == buf[1] == 0:
        break

    li.append(buf)

for i in li:
    if i[0] < i[1]:
        print('%d %d' % (i[0], i[1]))
    else:
        print('%d %d' % (i[1], i[0]))

Solution (Python):
a,b = (int(x) for x in input().split())
while(a != 0 or b != 0):
    if a > b:
        tmp = a
        a = b
        b = tmp
    print(a,b)
    a,b = (int(x) for x in input().split())

Solution (Python):
while True:
    a,b = [int(x) for x in input().split()]
    if a == 0 and b == 0:
        exit(0)
    if a > b:
        print(b,a)
    else:
        print(a,b)

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

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

Solution (Python):
i = 1
x, y = map(int, input().split())
while x != 0 or y != 0:
    if i <= 3000:
        if x > y:
            print(str(y), str(x))
        else:
            print(str(x), str(y))
        x, y = map(int, input().split())
        i += 1
    else:
        x = 0
        y = 0

Solution (Python):
import sys
for s in sys.stdin:
    if s=='0 0\n':
        break
    print(*sorted(map(int, s.split())))

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

Solution (Python):
for i in range(1,3100):
    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:
    a,b = map(int, input().split())
    if a == b == 0:
        break
    else:
        print("%d %d" %(min(a,b), max(a,b)))

Solution (Python):
def test():

	count = 0
	output = [[0 for i in range(3000)] for j in range(2)]

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

		if i[0] > i[1]:
			output[0][count] = i[1]
			output[1][count] = i[0]
		else:
			output[0][count] = i[0]
			output[1][count] = i[1]

		count += 1
	
	loop = 0
	for loop in range(count):
		print(f"{output[0][loop]} {output[1][loop]}")

if __name__ == "__main__":
	test()

Solution (Python):


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

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

Solution (Python):
i=0
while (1):
    i=i+1
    x,y=map(int,input().split())
    if (x==0)&(y==0):
        break
    print(min(x,y),max(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):
x, y = map(int, input().split())
while not (x == 0 and y == 0):
    print(" ".join([str(i) for i in sorted([x, y])]))
    x, y = map(int, input().split())

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

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:
        listA = list(map(int,input().split()))
        if listA == [0,0]:
            break
        else:
            print("{} {}".format(min(listA), max(listA)))

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

while not((x == 0) and (y == 0)):
    print(' '.join(map(str, sorted([y, x]))))
    x, y = map(int, input().split())

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 1:
    n1, n2 = map(int, input().split())
    if n1 == 0 and n2 == 0:
        break
    if n1 > n2:
        print('%d %d' % (n2, n1))
    else:
        print('%d %d' % (n1, n2))

Solution (Python):


A = []
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    else:
        if a > b:
            a,b = b,a
        else:
            pass
        A.append((a,b))


for i in range(len(A)):
    a,b = A[i]
    print(a,b)

Solution (Python):

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

Solution (Python):
import sys
nums = list(map(lambda x: int(x), sys.stdin.readline().split()))
while not (nums[0] == 0 and nums[1] == 0):
  if nums[0] >  nums[1]:
    print(nums[1], nums[0])
  else:
    print(nums[0], nums[1])
  nums = list(map(lambda x: int(x), sys.stdin.readline().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("{} {}".format(x,y))

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):
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:
    As = list(map(int, input().split()))
    if As == [0,0]:
        break
    print(*sorted(As))

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

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

Solution (Python):
list1 = []
while True:
    x,y = map(int,input().split())
    if x==0 and y==0:
        break
    else:
        if x>y:
            x,y = y,x
        list1.append([x,y])

for i in range(len(list1)):
    print(list1[i][0],list1[i][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
    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("%d %d" %(x,y))

Solution (Python):
for i in range(9999999):
    a = list(map(int, input().split()))

    
    if a[0] == 0 and a[1] == 0:
        break

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

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

Solution (Python):
for i in range(3001):
    x,y = sorted(map(int,input().split()))
    if (x,y)==(0,0):
        break
    print("{} {}".format(x,y))

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

Solution (Python):
xys =[]
while True:
    a,b =input().split()
    if a=='0' and b=='0':
        break
    xys.append([int(a),int(b)])
       
for xy in xys:
    x,y = sorted(xy)
    print(x,y)

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

    if x == y == 0:
        break

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

Solution (Python):
def filter(a,b):
    if a<=b:
        print(str(a)+" "+str(b))
    else:
        print((str(b)+" "+str(a)))


flg=0
i=1
in_data=input()
in_list=in_data.split(" ")
in_list[0]=int(in_list[0])
in_list[1]=int(in_list[1])

while flg==0:
    if in_list[0]==0 and in_list[1]==0:
        flg=1
    else:
        filter(in_list[0],in_list[1])
        in_data=input()
        in_list=in_data.split(" ")
        in_list[0]=int(in_list[0])
        in_list[1]=int(in_list[1])

Solution (Python):
while True:
    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):
a,b=sorted(map(int,input().split()))
while a!=0 or b!=0:
    print(a,b)
    a,b=sorted(map(int,input().split()))

Solution (Python):
if __name__ == "__main__":
    while True:
        a, b = map(lambda x: int(x), input().split())

        if a == 0 and b == 0:
            break

        if (a < b):
            print(f"{a} {b}")
        else:
            print(f"{b} {a}")

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

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

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


for i in range(3000):
    x, y = map(int,input().split())
    if x != 0 or y != 0:
        if x > y:
            print(y,x)
        else:
            print(x,y)
    else:
        break

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

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

Solution (Python):
v = list(map(int,input().split()))
while v[0]!=0 or v[1]!=0:
    if v[0]>v[1]:
        v[0],v[1] = v[1],v[0]
    print (v[0],v[1])
    v = list(map(int,input().split()))

Solution (Python):
while True:

    data=list(map(int,input().split()))
    if data[0]==0 and data[1]==0:
        break
    
    data.sort()
    print(f"{data[0]} {data[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):
li = []
while True:
  l = input()
  a, b = list(map(int,l.split()))
  if a ==0 and b == 0:
    break
  else:
    if a > b :
      a,b = b,a
  li.append(f'{a} {b}') 

for j in li:
  print(j)

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

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):
i = True

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

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

Solution (Python):
[x, y] = list(map(int, input().split(" ")))

while True:
    if x is 0 and y is 0:
        break
    if x < y:
        print(x,y)
    else:
        print(y,x)
    [x, y] = 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:
        print(x, y)
    else:
        print(y, x)

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

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

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=sorted([int(x) for x in input().split()])
    if (x,y)==(0,0): break
    print(x,y)

Solution (Python):
A = []
while True:
	a = [int(i) for i in input().split()]
	if a == [0,0]:
		break
	A.append(a)
	
for i in range(len(A)):
	if A[i][0] > A[i][1]:
		s = A[i][0]
		A[i][0] = A[i][1]
		A[i][1] = s
		
	print(A[i][0],A[i][1])

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=sorted([int(x) for x in input().split()])
    if (x,y)==(0,0): break
    print(x,y)

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

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

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

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

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

Solution (Python):
while True:
    [a,b] = [int(n) for n in input().split(' ')]
    if a == 0 and b == 0:
        break
    elif a > b:
        print(str(b)+" "+str(a))
    else:
        print(str(a)+" "+str(b))

Solution (Python):
L=list()
K=list()
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        for i in range(len(L)):
            print(L[i],end=" ")
            print(K[i])
        break
    else:
        if x<y:
            L.append(x)
            K.append(y)
        else:
            L.append(y)
            K.append(x)

Solution (Python):
while True:
  [x, y] = [int(n) for n in input().split(' ')]
  if x == 0 and y == 0:
    break
  elif x <= y:
    print("{} {}".format(x, y))
  elif y < x:
    print("{} {}".format(y, x))

Solution (Python):
for i in range(3000):
 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):
bul = True

while bul:

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

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

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

    else:
        print (x,y)

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

Solution (Python):
for i in range(3001):
    a,b = map(int, input().split())
    if b<a:
        c = a
        a = b
        b = c
    if a==0 and b==0:
        break
    print(a,b)

Solution (Python):
p=0
ans=[]
while p==0:
    x,y=map(int,input().split())
    if x==0 and y==0:
        p=1
    else:
        ans.append([min(x,y),max(x,y)])

for i,j in ans:
    print(i,j)