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:
    l = list(map(int, input().split()))
    if l[0] == l[1] == 0:
        break
    else:
        l.sort()
        print(l[0], l[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=sorted(map(int, input().split()))
    if not sum(a):break
    print(*a)

Solution (Python):
c = 0
while(1):
    x,y = (int(a) for a in input().split(' '))
    if(x == 0 and y == 0):
        break
    if(y<x):
        print(y,x)
    else:
        print(x,y)

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

Solution (Python):

while True:
    l=input().split(" ")
    if l[0]=="0" and l[1]=="0":
        break
    
    if int(l[0]) < int(l[1]):
        print(l[0] + " " + l[1]) 
    else:
        print(l[1] + " " + l[0])

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

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

Solution (Python):
import sys

for line in sys.stdin:
    a, b = (int(n) for n in line.strip().split())
    if a == 0 and b == 0:
        break
    print(' '.join(map(str, sorted([a, b]))))

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

Solution (Python):

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

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

Solution (Python):
import sys
l = []
for x in sys.stdin:
  l.append(sorted(list(int(y) for y in x.split() )))
  if l[-1] == [0,0]:
    break
  
for ll in l:
  if ll == [0,0]:
    break
  print("{} {}".format(ll[0], ll[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(x,y)

Solution (Python):
import sys
lines = sys.stdin.readlines()
for line in lines:
    x, y = map(int, line.split())
    if x == y == 0:
        break
    print(f'{x} {y}') if 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:
        if a>b:
            a,b=b,a
        print("%d %d"%(a,b))

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

Solution (Python):
num_input=list(map(int,input().split()))

while num_input[0]!=0 or num_input[1]!=0:
    if num_input[0]<num_input[1]:
        print(str(num_input[0])+" "+str(num_input[1]))
    else:
        print(str(num_input[1])+" "+str(num_input[0]))
    num_input=list(map(int,input().split()))

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

    try:
      dat = input().split()
      x = dat[0]
      y = dat[1]
    except EOFError:
      pass

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

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

Solution (Python):
import sys
for i in range(1,sys.maxsize):
    x,y=list(map(int,input().split()))
    if x==0 and y==0:
        break
    else:
        if x <= y:
            print(x,y)
        else:
            print(y,x)

Solution (Python):
x = 1
y = 1
z = input()
x , y = [ int(a) for a in z.split() ]
while not(x == 0 and y == 0):
    if x < y:
        print (str(x) + " " + str(y))
    elif x > y:
        print (str(y) + " " + str(x))
    else:
        print (str(x) + " " + str(y))
    z = input()
    x , y = [ int(a) for a in z.split() ]

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

Solution (Python):

while True:
    try:
        (a,b)  =  map(int,input().split())
    except:
     exit
    if ( a == 0 and b == 0):
        break
    elif ( a < b):
        print(a,b)
    else:
        print (b,a)

Solution (Python):
l = []

while(1):
    a, b = map(int, input().split())

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

    l.append([a, b])

for a, b in l:
    if a > b:
        a, b = b, a
    print(a, b)

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

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

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

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x+y != 0:
        print('%d %d' % (min(x,y),max(x,y)))
    else:
        break

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
while True:
    L = list(map(int, input().split()))
    if L.count(0) == 2:
        break
    L.sort()
    print(*L)

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

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

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

Solution (Python):
num_str = []
while True:
	inputValue = input()
	if inputValue == "0 0":
		break
	num_str.append(inputValue)
for i in range(0, len(num_str)):
	a, b = [int(j) for j in num_str[i].split(" ")]
	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(str(y)+" "+str(x))
    else:
        print(str(x)+" "+str(y))

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

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

Solution (Python):
cnt = 0
while 1:
    inp = list(map(int, input().split()))
    inp.sort()
    cnt += 1
    if inp == [0, 0] or cnt >= 3000:
        break
    print("{} {}".format(inp[0], inp[1]))

Solution (Python):
import sys

for row in sys.stdin.readlines():
    x = int(row.rstrip().split()[0])
    y = int(row.rstrip().split()[1])
    
    if int(x) == 0 and int(y) == 0:
        break
    else:
        print(*(sorted([x,y])))

Solution (Python):
for i in range(3000):
    try:
        x,y=list(map(int,input().split()))
        if x!=0 or y!=0:
            if x>y:
                print(str(y)+' '+str(x))
            else:
                print(str(x)+' '+str(y))
    except EOFError:
        break

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):
while True:
	a, b = sorted(map(int, input().split()))
	if (a == 0) & (b == 0): break
	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):
while True:
    arr = sorted(list(map(int, input().split())))
    if 0 == arr[0] == arr[1]: break
    print(' '.join(map(str, arr)))

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

    if a > b:
        a,b = b,a

    print(f"{a} {b}")

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

Solution (Python):
a, b = map(int, input().split())
result = []
while (a or b):
    if (a > b):
        temp = a
        a = b
        b = temp
    result.append((a, b))
    a, b = map(int, input().split())

for item in result:
    print(item[0], end = ' ')
    print(item[1])

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

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

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

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

Solution (Python):
a = []
for i in range(3000):
    b,c = map(int,input().split())
    if b == 0 and c == 0:
        break
    a.append([b,c])
for i in a:
    i.sort()
    print("{0} {1}".format(i[0],i[1]))

Solution (Python):

list = []
for i in range(3000):
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    list.append([x, y])
for x, y in list:
    if x < y:
        print (x, y)
    else:
        print (y, x)

Solution (Python):

while True:
    n,m=map(int,input().split())
    if n==0 and m==0:
        break
    if n>m:
        print(m,n)
    else:
        print(n,m)

Solution (Python):

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

Solution (Python):
print_values = []
while True:
    input_value = input().split()
    a = int(input_value[0])
    b = int(input_value[1])
    if a == 0 and b == 0:
        break
    elif a > b:
        print_values.append([b, a])
    else:
        print_values.append([a, b])

for values in print_values:
    print("{0} {1}".format(values[0], values[1]))

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

Solution (Python):
a, b = map(int, input().split())
Fin = (True if a == 0 and b == 0 else False)
printer = []
while not Fin:
    printer.append([min(a, b), max(a, b)])
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        Fin = True
for i in range(len(printer)):
    print(printer[i][0], printer[i][1])

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

		if x + y:
			print("%s %s" %((x, y) if x <= y else (y, x)))

		else:
			break

if __name__ == '__main__':
	run()

Solution (Python):
import sys
input_lines = sys.stdin.readlines()[:-1]
for input_line in input_lines:
    a, b = [int(i) for i in input_line.split()]
    if a > b:
        print('{0} {1}'.format(b, a))
    else:
        print(input_line.rstrip())

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

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

while not x==y==0:
	if x>=y:
		print(y,x)
	else:
		print(x,y)
	x,y=map(int,input().split())

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

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

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

Solution (Python):
x, y = (int(i) for i in input().split())
while x!=0 or y!=0:
    if x < y:
        print("{0} {1}".format(x,y))
    else:
        print("{0} {1}".format(y,x))
    x, y = (int(i) for i in input().split())

Solution (Python):
sss = input()
counter = 1
while not sss == '0 0':
	ss = sss.split(' ')
	a = int(ss[0])
	b = int(ss[1])
	if a < b: print(a,b)
	else: print(b,a)
	sss = input()

Solution (Python):


def main():

	while True:
		x,y = map(int,raw_input().split())
		if x == y == 0:
			break
		if x > y:
			temp = x
			x = y
			y = temp
		print('%d %d' % (x,y))

if __name__ == "__main__":

	main()

Solution (Python):
data = []
tmp = []
for x in range(0,1000000):
    a,b = map(int, input().split())
    if a==0:
        if b==0:
            break
        pass
    data.append((a,b))
for x in range(0,len(data)):
    tmp = list(data.pop(0))
    tmp.sort()
    print(tmp[0],tmp[1])
    tmp.clear()

Solution (Python):
xy=[]
while True:
    (x,y) = map(int,raw_input().split())
    if x==y==0:
        break
    xy.append(sorted([x,y]))
for i in xy:
    print i[0], i[1]