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

Solution (Python):
for i in range(1, 10001):
    x, y = map(lambda z: int(z), input().split(" "))
    if (x, y) == (0, 0):
        break
    if y < x:
        print("{} {}".format(y, x))
    else:
        print("{} {}".format(x, y))

Solution (Python):
while True:
	xy = list(map(int, input().split()))
	if sum(xy) != 0:
		xy.sort()
		print("%d %d" % (xy[0], xy[1]))
	else:
		break

Solution (Python):
for i in range(0, 3000):
  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






for i in range(0,10000):
    tmp = input().split()
    x,y = list(map(lambda a: int(a), tmp))
    if((x==0)and(y==0)):
        sys.exit()

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

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

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

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

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

Solution (Python):
while 1:
    val = input().split()
    val = [int(n) for n in val]
    if val[0] == 0 and val[1] == 0:
        break
    print(min(val), max(val))

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

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

Solution (Python):
x = []
y = []
for _ in range(1,10001):
    a, b = map(int,input().split())
    if a == b == 0:
        break
    x.append(a)
    y.append(b)

for x_num, y_num in zip(x,y):
    if x_num > y_num:
        x_num, y_num = y_num, x_num
    print(x_num,y_num)

Solution (Python):

while True:
    a, b = map(int, input().split())
    if a == b == 0:
        break
    elif a <= b:
        print(a, b, sep=' ')
    elif b < a:
        print(b, a, sep=' ')

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):
x = []
y = []

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

for i in range(len(x)):
    if x[i] <= y[i]:
        print('{} {}'.format(x[i], y[i]))
    else:
        print('{} {}'.format(y[i], x[i]))

Solution (Python):
while True:
  n = [int(i) for i in input().split()]
  n = sorted(n)
  if n.count(0)==2:
    break
  print(*n)

Solution (Python):
for i in range(3000):
    s = input()
    t = s.split()
    l=[int(t[0]),int(t[1])]
    if l[0] == 0 and l[1] == 0:
        break
    l.sort()
    print(l[0],l[1])

Solution (Python):

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

Solution (Python):
for i in range(3005):
    input_list = [int(x) for x in input().split()]
    
    if input_list[0] == 0 and input_list[1] == 0: 
        break
    else: 
        input_list.sort()
        input_list = [str(x) for x in input_list]
        print(' '.join(input_list))

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

Solution (Python):

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

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

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

Solution (Python):
for i in range (3000):
    s = list(map(int,input().split()))
    s.sort()
    if s[1] == 0:
        break
    else:
        print(s[0],s[1])

Solution (Python):

tmp = []
n = 0
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    else:
        x = min(a, b)
        y = max(a, b)
        tmp.append([x, y])
        n += 1

for i in range(n):
    print(tmp[i][0], tmp[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):
ans_list = list()
while True:
    x,y = map(int,input().split())
    xy = [x,y]
    if [x,y] == [0,0]:
        break
    ans_list.append([x,y])

for pair in ans_list:
    pair =sorted(pair)
    pair = [str(n) for n in pair]
    print(' '.join(pair))

Solution (Python):
lst = []
while True:
    x, y = map(int, input().split())
    if x == y == 0:
        break
    lst.append("{} {}".format(min(x, y), max(x, y)))
for i in lst:
    print(i)

Solution (Python):
X=[]
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    X.append([min(x,y),max(x,y)])
for j in range(len(X)):
    print(*X[j])

Solution (Python):
n = []
d = []
while True:
    n = [int(i) for i in input().split()]
    if n[0] == 0 and n[1] == 0:
        break
    else:
        n.sort()
        d.append(n)

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

Solution (Python):
A = []
a,b = map(int, input().split())
while a != 0 or b != 0:
    B = [a,b]
    A.append(sorted(B))
    a, b = map(int, input().split())
for i in range(len(A)):
    print(A[i][0], A[i][1])

Solution (Python):
for i in range(10001):
    x,y=map(int,input().split())
    if(x+y==0):
        break
    elif(x>y):
        x,y=y,x
    print(x,y)

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

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

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

Solution (Python):
x = []
y = []
while(True):
    a,b = map(int,input().split())
    if(a==0 and b==0):
        break
    x.append(a)
    y.append(b)
for i in range(len(x)):
    if(x[i] > y[i]):
        print(str(y[i])+" "+str(x[i]))
    else:
        print(str(x[i]) + " " + str(y[i]))

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

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

for x in a:
    print(x[0], x[1]) if x[0] < x[1] else print(x[1], x[0])

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

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

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

Solution (Python):
while 1:
    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):
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 swap(a, b):
    if a > b:
        return b, a
    return a, b


while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    
    a, b = swap(a, b)
    print(f'{a} {b}')

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

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

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

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

Solution (Python):
answer = []
while True:
    xy = sorted(list(map(int, input().split())))
    if xy[0] == xy[1] == 0:
        break
    else:
        answer.append(xy)

[print(*answer[i]) for i in range(len(answer))]

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 > y:
    j = x
    x = y
    y = j
  if x == 0 and y == 0:
    break
  print(x, y)

Solution (Python):
x,y=(int(x) for x in input().split())
while x!=0 or y!=0:
    if x<y:
        print(x,y)
    else:
        print(y,x)
    x,y=(int(x) for x in input().split())

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

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

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

Solution (Python):
count = 0
lists_list = list()

while True:
    lists = list(map(int, input().split()))
    if lists[0] == 0 and lists[1] == 0:
        break
    lists.sort()
    lists_list.append(lists)
    count += 1

for i in range(0, count):
    print(f"{lists_list[i][0]} {lists_list[i][1]}")

Solution (Python):
for i in range(10000):
    x, y = map(int, input().split())
    if x < y:
        print(str(x) + " " + str(y))
    elif y < x:
        print(str(y) + " " + str(x))
    elif x == 0:
        break
    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:
        x, y = y, x
    print(x, y)

Solution (Python):
def swapPrintMin(pair):
	if pair[0] < pair[1]:
		print(pair[0],pair[1])
	else:
		print(pair[1],pair[0])

def main():
	pairList = []
	while True:
		try:
			pairList.append(list(map(int,input().split())))

		except:
			break;

	for i in pairList:
		if i == [0,0]:
			continue
		
		swapPrintMin(i)

if __name__ == '__main__':
	main()

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

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

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

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

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

Solution (Python):
import sys
import itertools



read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

while 1:
    A = [int(i) for i in readline().split()]
    if A[0] == 0 and A[1] == 0:
        break
    else:
        A.sort()
        print(*A)

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

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

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

Solution (Python):
i=0
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
for s in sys.stdin:
 if'0 0\n'==s:break
 print(*sorted(map(int,s.split())))

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

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

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

Solution (Python):
while True:
    x, y = map(int, input().split())
    
    if x == 0 and y == 0:
        break
    
    list_num = [x, y]
    list_num.sort()
    print(" ".join(map(str, list_num)))

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

Solution (Python):


iim = lambda: map(int, input().rstrip().split())

def resolve():
    while True:
        a, b = iim()
        if a == b == 0:
            break
        elif a > b:
            a, b = b, a
        print(a, b)

if __name__ == "__main__":
    resolve()

Solution (Python):
import sys
for line in sys.stdin.readlines():
    if line == "0 0\n":
      break
    s = line.split()
    if int(s[0]) > int(s[1]):
      print(s[1], s[0])
    else:
      print(s[0], s[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):

import sys

str_lines = [x.strip("\n") for x in sys.stdin.readlines()]

int_lines=[]
for S in str_lines:
  int_lines.append( list( map(int, S.split()) ) )


for L in int_lines:
  x, y = L
  
  if x == 0 and y == 0:
    break
  else:
    if x > y:
      print(y, x)
    else:
      print(x, y)

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

Solution (Python):
for i in range (10000):
    c,d=map(int,input().split())
    if c==0 and d==0:
        break
    elif c > d:
        print(d,c)
    else:
        print(c,d)

Solution (Python):
for i in range(3000):
  x, y = [int(a) for a in input().split()]
  if int(x) > int(y):
    print(str(y) , str(x))
  elif x == 0 and y == 0:
    break
  else:
    print(str(x) , str(y))

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

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

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

  if x > y:
    tmp = x
    x = y
    y = tmp
  elif x == y == 0:
    break

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

Solution (Python):

l=[]
for i in range(1,3000):
  ll=[]
  x,y=(int(i) for i in input().split())
  if x==0 and y==0:
    break
  ll.append(x)
  ll.append(y)
  l.append(ll)

for j in range(len(l)):
  X=min(l[j][0],l[j][1])
  Y=max(l[j][0],l[j][1])
  print(str(X)+" "+str(Y))

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

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

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

Solution (Python):
while True:
    a,b = 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):
for i in range(10000):
    xy = list(map(int, input().split()))
    if sum(xy) == 0:
        exit()
    print(min(xy), max(xy))

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

for i in iter(input, '0 0'):
    a, b = list(map(int, i.split()))
    if a < b:
        print('%d %d' % (a, b))
    else:
        print('%d %d' % (b, a))

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

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(0, 3000):
    x,y = map(int, input().split())
    if x != 0 or y != 0:
        print(min(x,y), max(x, y))
    else:
        break

Solution (Python):


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

Solution (Python):
for i in range (3000):
    x,y = raw_input().split()
    if int(x) == 0 and int(y) == 0:
        break
    if int(x) > int(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:
        quit()
    if x <= y:
        print("{} {}".format(x, y))
    else:
        print("{} {}".format(y, x))

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

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

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

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

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

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

Solution (Python):
for i in range(3000):
    x, y = map(int, input().split())
    list = [x,y]
    if x==y==0:
        break
    else:
        list = [x,y]
        list.sort()
        print(list[0], list[1])

Solution (Python):
for i in range(3000):
    x, y = map(int,input().split())
    if x + y == 0:
        exit()
    else:
        print("%d %d" % (min(x,y),max(x,y)))

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

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

Solution (Python):
import sys

while True:
    l = input()
    a, b = map(int, l.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
    if x > y:
        x,y = y,x
    print("{} {}".format(x,y))

Solution (Python):
def print_num(a, b):

    if a < b:
        first  = a
        second = b
    else:
        first  = b
        second = a

    print(str(first) + " " + str(second))

if __name__ == "__main__":

    while(1):
        param = input()
        param = param.split(" ")

        a = int(param[0])
        b = int(param[1])

        if a == 0 and b == 0:
            break
        else:
            print_num(a, b)

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

Solution (Python):
for xi in range(1, 10000000000000000):
    inline = input().split()
    a, b = (int(xi) for xi in inline)
    if a==0 and b==0:
        break
    if a > b:
        sub = a
        a = b
        b = sub
    print(a, b)

Solution (Python):
D = list(map(int, open(0).read().split()))[:-2]
for a, b in zip(*[iter(D)]*2):
    print(f'{min(a, b)} {max(a, b)}')

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    xy=list(map(int,input().split()))
    while xy!=[0,0]:
        xy.sort()
        print(*xy)
        xy = list(map(int, input().split()))

main()

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

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

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

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

Solution (Python):
l=[]
i=0

while True:
    x,y=input().split()

    x=int(x)
    y=int(y)

    if x==y and x==0:
        break
    if x>y:
        w=x
        x=y
        y=w
    l.append([x,y])
    i=i+1

for j in range(i):
    print(l[j][0],l[j][1])

Solution (Python):
while True:
    a=list(map(int,input().split()))
    if a != [0,0]:
        a=sorted(a)
        print(*a)
    else:break

Solution (Python):
first = 1
second = 1 
while first != 0 or second != 0:
    input_number = input().split()
    first = int(input_number[0])
    second = int(input_number[1])
    if first==0 and second==0:
        break
    elif (first>=second):
        print(second,first)
    else:
        print(first,second)

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

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 i,line in enumerate(sys.stdin):
  a,b = map(int, line.strip().split(' '))
  if a == 0 and b == 0: exit()
  if a > b: a,b = b,a
  print(a,b)

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

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

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

Solution (Python):
list = []
for i in range(10001):
    a, b = (int(x) for x in input().split())
    if a == 0 and b == 0:
        break
    list.append([min(a,b), max(a, b)])
for n in range(len(list)):
    print(str(list[n][0]), str(list[n][1]))

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

Solution (Python):
while True:
    l = input()
    a, b = map(int, l.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
    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
    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,sep=' ')
    else:
        print(a,b,sep=' ')

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(str(a) + ' ' + str(b))
    else:
        print(str(b) + ' ' + str(a))

Solution (Python):
i = 0
while i < 3000:
    l = input()
    x, y = [int(i) for i in l.split()]
    if x == y == 0:
        break
    
    if x > y:
        x, y = y, x
    print(x, y)
    i += 1

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

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

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

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

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

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

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

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

  print(f"{x} {y}")

Solution (Python):

for i in range(1,3000):
    nums=input()
    n_list=nums.split()
    x=int(n_list[0])
    y=int(n_list[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 == 0 and y ==0:
        break
    elif x > y:
        x,y = y,x
    print("%d %d" %(x,y))

Solution (Python):

def Swap(a,b):
    if a > b:
        a,b = b,a
    return a,b


def main():
    while True:
        a, b= map(int, input().split())
        if a == 0 and b == 0:
            break
        else:
            a,b = Swap(a,b)
            print("%d %d" %(a,b))

if __name__ == "__main__":
    main()