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



import sys

while True:
    a, b = map(int, sys.stdin.readline().split())
    if a == 0 and b == 0:
        break
    if a <= b:
        print(a, b)
    else:
        print(b, a)

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

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

  elif x and y !=0:
    print(x,y)
    continue

  elif x==y==0:
    break

Solution (Python):
i = 1
while True:
    x, y = map(int, input().split())
    if x >= 0 and x <= 10000:
        if y >= 0 and y <= 10000:
            if x == 0 and y == 0:
                break
            if i > 3000:
                break
            if x > y:
                z = x
                x = y 
                y = z
            print('{0} {1}' .format(x, y))
    i += 1

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

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

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

Solution (Python):
while True:
    x = sorted(list(map(int, input().rstrip().split())))
    if x == [0, 0]:
        break
    for i, n in enumerate(x, 1):
        if i == len(x):
            print(n)
        else:
            print(n, end=" ")

Solution (Python):


if __name__ == '__main__':
    while True:
        x, y = map(int, raw_input().split())
        if x == 0 and y == 0:
            break

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

Solution (Python):
a=[]
i=0
s=0
def judge(n,m):
    if n<=m:
        return str(n)+" "+str(m)
    else:
        return str(m)+" "+str(n)

while 1:
    l= input().split()
    n=int(l[0])
    m=int(l[1])
    if n==0 and m==0:
        break
    else:
        a.append(judge(n,m))
        i=i+1

while s<i:
    print(a[s])
    s=s+1

Solution (Python):
s = ''
while True:
    a = list(map(int,input().split(' ')))
    if a[0] == 0 and a[1] == 0:
        break
    else:
        a.sort()
        s += ' '.join(map(str, a)) + '\n'
if s != '':
    print(s[:-1])

Solution (Python):
a = 100
while a != 0:
    lis = [int(x) for x in input().split()]
    if lis[0]+lis[1] != 0:
        lis.sort()
        print(lis[0],end = " ")
        print(lis[1])
    a = lis[0]+lis[1]

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

Solution (Python):
a, b= map(int, input(). split())
while a!=0 or b!=0:
    list1=[a, b]
    list1.sort()
    print(str(list1[0]) + " " + str(list1[1]))
    a, b= map(int, input(). split())

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

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

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

Solution (Python):
last = 1
while last != 0:
	num = list(map(int, input().split(" ")))
	if num[0] == 0 and num[1] == 0:
		last = 0
	else:
		if num[0] >= num[1]:
			print(str(num[1]) + " " + str(num[0]))
		else:
			print(str(num[0]) + " " + str(num[1]))

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

Solution (Python):






int_in = [1,1]
int_out = []


while 1:
	str_in = raw_input()
	int_in = map(int, str_in.split())
	if int_in[0] == 0 :
		if int_in[1] == 0:
			break
	
	if int_in[0] > int_in[1]:
		swap = int_in[0]
		int_in[0] = int_in[1]
		int_in[1] = swap
	
	int_out.extend([int_in])


for i in int_out:
		print(repr(i[0]) + ' ' + repr(i[1]))

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

Solution (Python):
n = []
i = 0
while i < 3000:
    n = [int(i) for i in input().split()]
    if n[0] == 0 and n[1] == 0:
        break
    m = 0
    if n[0] > n[1]:
        m = n[0]
        n[0] = n[1]
        n[1] = m
    print(str(n[0]) + " " + str(n[1]))
    i += 1

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

Solution (Python):
ans = []
while True:
    a,b = map(int,raw_input().split())
    if a == 0 and b == 0:
        break
    elif a < b:
        ans.append([a,b])
    else:
        ans.append([b,a])
for char in ans:
    print str(char[0])+" "+str(char[1])

Solution (Python):
import sys

l = []
for i in sys.stdin:
    l.append(i)

for i in range(0,len(l)):
    l[i] = l[i].split()

for i in range(0,len(l)):
    if l[i][0] == '0' and l[i][1] == '0':
        continue
    x = l[i][0]
    y = l[i][1]
    if int(y) < int(x):
        temp = x
        x = y
        y = temp
    print(x,y)

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

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

Solution (Python):
x = []
y = []
while(1):
    n1,n2 = map(int,input().split())
    if n1 == 0 and n2 == 0 :
        break
    else:
        x.append(n1)
        y.append(n2)    
for i in range(len(x)):
    if(x[i]>y[i]):
        x[i],y[i] = y[i],x[i]
        print("{} {}".format(x[i],y[i]))
    else:
        print("{} {}".format(x[i],y[i]))

Solution (Python):
x = []
y = []
while(1):
    n1,n2 = map(int,input().split())
    if n1 == 0 and n2 == 0 :
        break
    else:
        x.append(n1)
        y.append(n2)    
for i in range(len(x)):
    if(x[i]>y[i]):
        x[i],y[i] = y[i],x[i]
        print("{} {}".format(x[i],y[i]))
    else:
        print("{} {}".format(x[i],y[i]))

Solution (Python):
while(True):
  temp = raw_input()
  temp_list = temp.split()
  x = int(temp_list[0])
  y = int(temp_list[1])
  if x == y and x == 0:
    break
  else:
    print(str(min([x, y]) ) + " " + str(max([x, y]) ))

Solution (Python):
count = 0
a = 0
b = 0
while (count <= 3000) and (a  <= 10000) and (b <= 10000):
    a,b = map(int, input().split())
    if a == b == 0:
        break

    if a > b:
        tmp = a
        a = b
        b = tmp

    count += 1
    print(a, b, sep = ' ')

Solution (Python):
count = 0
a = 0
b = 0
while (count <= 3000) and (a  <= 10000) and (b <= 10000):
    a,b = map(int, input().split())
    if a == b == 0:
        break

    if a > b:
        tmp = a
        a = b
        b = tmp

    count += 1
    print(a, b, sep = ' ')

Solution (Python):
count = 0
a = 0
b = 0
while (count <= 3000) and (a  <= 10000) and (b <= 10000):
    a,b = map(int, input().split())
    if a == b == 0:
        break

    if a > b:
        tmp = a
        a = b
        b = tmp

    count += 1
    print(a, b, sep = ' ')

Solution (Python):
count = 0
a = 0
b = 0
while (count <= 3000) and (a  <= 10000) and (b <= 10000):
    a,b = map(int, input().split())
    if a == b == 0:
        break

    if a > b:
        tmp = a
        a = b
        b = tmp

    count += 1
    print(a, b, sep = ' ')

Solution (Python):


while True:
    n = list(map(int, input().split()))
    if (n[0] == 0) & (n[1] == 0):
        break
    n.sort()
    print('{0} {1}'.format(n[0], n[1]))

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

Solution (Python):
while True:
    nums = [int(n) for n in input().split()]
    if sum(nums) == 0:
        break
    nums.sort()
    print(" ".join(map(str,nums)))

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

Solution (Python):
while 1:
	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):
a = []

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

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

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

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

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

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;

    elif x <= y:
        print(str(x) + " " + str(y))

    else:
        print(str(y) + " " + str(x))

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

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

    elif x <= y:
        print(str(x) + " " + str(y))

    else:
        print(str(y) + " " + str(x))

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

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

    elif x <= y:
        print(str(x) + " " + str(y))
    else:
        print(str(y) + " " + str(x))

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

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

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

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

Solution (Python):



for i in range(3000):
    x, y = [int(n) for n in input().split(' ')]
    if x == 0 and y == 0:
        break

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

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

    print(ary[0], ary[1])

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

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

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

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

Solution (Python):
while True:
    a, b = [int(s) for s 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):
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    while True:
        a = numinput()
        if a[0] == 0 and a[1] == 0: break
        if a[0] < a[1]: print('%d %d' % (a[0], a[1]))
        else: print('%d %d' % (a[1], a[0]))

if __name__ == "__main__":
    main()

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

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

Solution (Python):
flag = True
while flag:
    data = list(map(int,input().split()))
    if((data[0]+data[1])==0):
        flag = False
    else:
        out = sorted(data)
        print("{0} {1}".format(out[0],out[1]))

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

for i in range(len(a)):
    sort = sorted(a[i])
    print(sort[0], sort[1])

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

Solution (Python):



while True:
   n = map(int,raw_input().split())
   if n == [0,0]:
      break
   a = sorted(n)
   print('%i %i' % (a[0],a[1]))

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

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

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

Solution (Python):
import sys

if __name__ == '__main__':
    for line in sys.stdin.read().splitlines():
    	if line == '0 0':
    		break
    	a, b=map(int, line.split())
    	if a<b:
    		print a,b
    	else:
    		print b,a

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

Solution (Python):
def swap(a, b):
    dummy = a
    a = b
    b = dummy
    return a, b


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

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

    print(x, y)

Solution (Python):
lis = []
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 = 1
while True:
    A = list(map(int, input().split()))
    if A != [0, 0]:
        print("{} {}".format(sorted(A)[0], sorted(A)[1]))
        i += 1
    else:
        break

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

Solution (Python):


zeroCount = 0
while zeroCount == 0:
    numbers = [int(i) for i in input().rstrip().split()]
    
    if numbers[0] == 0 and numbers[1] == 0:
        zeroCount += 1
    else:
        swap = sorted(numbers)
        
        a = [str(n) for n in swap]
        print(" ".join(a))

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

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

Solution (Python):
a=1
b=1
l=[]
while(a!=0 or b!=0):
    a,b=map(int,input().split())
    l.append([a,b])
for i in range(len(l)):
    if l[i][0]>l[i][1]:
        print(l[i][1],l[i][0])
    elif l[i][0]==0 and l[i][1]==0:
        break
    else:
        print(l[i][0],l[i][1])

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

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

if __name__ == "__main__":
    main()

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

Solution (Python):
def solve(line):
    
    for array in line:
        
        if array[0] >= array[1]:
            temp = array[0]
            array[0]=array[1]
            array[1] = temp
            print('{0} {1}'.format(array[0],array[1]))
        else:
            print('{0} {1}'.format(array[0],array[1]))

 

def answer():
    line=[]
    while True:
        s = input().split()
        
        if s[0]=='0' and s[1]=='0':
            break
        line.append(list(map(int, s)))
        
        
        
   
    
    solve(line)

if __name__ =='__main__':
    answer()

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 == y == 0:
        break

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

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

Solution (Python):
while True:
    l = map(int, raw_input().split())
    if l[0] == 0 and l[1] == 0:
        break
    l.sort()
    print("%d %d" % tuple(l))

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

  for x in a:
    print x,
  print

Solution (Python):



def main():
	swapping_numbers = []
	while True:
		x, y = [int(n) for n in raw_input().split(" ")]
		if x == 0 and y == 0:
			break
		swapping_numbers.append([x, y])

	for swapping_number in swapping_numbers:
		if swapping_number[0] > swapping_number[1]:
			swapping_number[0], swapping_number[1] = swapping_number[1], swapping_number[0]
		print "%d %d" % tuple(swapping_number)

if __name__ == '__main__':
	main()

Solution (Python):
import sys
for line in sys.stdin:
    a,b = line.split()
    a,b = int(a),int(b)
    if a == 0 and b == 0: break
    if b<a: a,b = b,a
    print '%d %d' %(a, b)

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

Solution (Python):
r = 0
while r == 0:
        n = map(int,raw_input().split())
        if n[0] == n[1] == 0:
                break
        elif n[0] < n[1]:
                print n[0] ,
                print n[1] 
        else:
                print n[1] ,
                print n[0]

Solution (Python):
from __future__ import division, print_function
from sys import stdin
while True:
    li = list(sorted(int(s) for s in stdin.readline().split()))
    if not any(li):
        break
    print(*li)

Solution (Python):
import sys
for line in sys.stdin:
    cols = map(int, line.rstrip('\n').split(' '))
    x, y = cols[0], cols[1]
    if x == 0 and y == 0: break
    print '%d %d' % (min(x, y), max(x, y))

Solution (Python):
while True:
    i = map(int, raw_input().split())
    if i[0]==0 and i[1]==0: break
    else: print min(i),max(i)

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

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

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

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

Solution (Python):
while 1:
    a, b = sorted(map(int, raw_input().split()))
    if a + b == 0:
        break
    else:
        print a, b

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

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

Solution (Python):
if __name__ == '__main__':
    output = []
    while True:
        x, y = map(int, raw_input().split(' '))
        if x == 0 and y == 0:
            break
        else:
            if x > y:
                output.append('%d %d' % (y, x))
            else:
                output.append('%d %d' % (x, y))

    for line in output:
        print line

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

Solution (Python):
while True:
 x,y=map(int,raw_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):
import sys

while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split(' ')]

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

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

    print(x, y)

Solution (Python):
l = []

while(1):
    num = list( map(int, input().split()) )
    x = num[0]
    y = num[1]
    if(x==0 and y==0):
        break
    l.append(x)
    l.append(y)

pairs = int(len(l)/2)

for i in range(0,pairs):
    a = l[i*2]
    b = l[i*2+1]
    if(a<=b):
        print(a,end=" ")
        print(b)
    else:
        print(b,end=" ")
        print(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("%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):
while 1:
    a,b=map(int,input().split())
    if a==0 and b==0:
        exit()
    print(min(a,b),max(a,b))

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

Solution (Python):

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

while i<=3000 :
    i += 1
    x,y = map(int,input().split())
    if (x == 0) & (y == 0) :
        break
    elif 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
    print(f"{a} {b}" if a <= b else f"{b} {a}")

Solution (Python):
input_list = []

while True:
    pair_str = input().split()
    pair_int = [int(s) for s in pair_str]
    if pair_int[0] == 0 and pair_int[1] == 0 :
        break
    else:
        input_list.append(pair_int)

for pair_int in input_list:
    if pair_int[0] <= pair_int[1]:
        print("{} {}".format(pair_int[0], pair_int[1]))
    else:
        print("{} {}".format(pair_int[1], pair_int[0]))

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

j=0

for i in lists:
    print("{0} {1}".format(lists[2*j],lists[2*j+1]))
    j=j+1
    if j==len(lists)//2:
        break

Solution (Python):
for i in range(1,3000+1) :
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    else :
        X=min(x,y)
        Y=max(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("%d %d" %(x,y))

Solution (Python):
la = list()
lb = list()
casenum = 0;

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

for num in la:

    if la[casenum]<lb[casenum]:
        print(la[casenum],lb[casenum])
    else:
        print(lb[casenum],la[casenum])
    casenum +=1

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

Solution (Python):
mylist = []
while True:
    value = input()
    if value == "0 0":
        break
    if value:
        v_list = [int(i) for i in value.split()]
        v_list.sort()
        mylist.append(v_list)
for i in mylist:
    print(i[0], i[1])

Solution (Python):
def minmax(a,b):
    return [min(a,b),max(a,b)]

x,y = map(int,input().split())
while x+y!=0:
    x,y = minmax(x,y)
    print(x,y)
    x,y = map(int,input().split())

Solution (Python):

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

Solution (Python):
stopper = 1
x,y = [],[]
while stopper == 1:
	a,b = map(int,input().split())
	if a == 0 and b == 0:
		stopper = 0
	else:
		x.append(min(a,b))
		y.append(max(a,b))
for i in range(len(x)):
	print(x[i],y[i])

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

while True:
    l = list(map(int, input().split()))
    if(l[0] == 0 and l[1] == 0):
        sys.exit()
    else:
        if(l[0] > l[1]):
            print('{0} {1}'.format(l[1], l[0]))
        else:
            print('{0} {1}'.format(l[0], l[1]))

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):
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):
z = list()

while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    else:
        z.append(x)
        z.append(y)
        z.sort()
        print(z[0],z[1])
        z.clear()

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

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

Solution (Python):
import sys
S = sys.stdin.buffer.readlines()
A = []
B = []
for s in S:
    A.append(s.split()[0].decode())
    B.append(s.split()[1].decode())

for a, b in zip(A, B):
    if(int(a) == 0 and int(b) == 0):
        break
    if(int(a) >= int(b)):
        print(f"{b} {a}")
    else:
        print(f"{a} {b}")

Solution (Python):
while True:
    x,y=(int(i) for i in input().split())
    if x==0 and y==0:
        break
    else:
        syo=min(x,y)
        dai=max(x,y)
        print(syo,dai)

Solution (Python):
while(True):
    val = input().split(" ")
    s = [int(n) for n in val]
    s.sort()
    if s == [0,0]:
        break
    print("{0} {1}".format(s[0],s[1]))

Solution (Python):
while True:
    val = input().split()
    s = [int(n) for n in val]
    s.sort()
    if s[0] == 0 and s[1] == 0:
        break
    print("{0} {1}".format(s[0], s[1]))

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

Solution (Python):
d=[]
while True:    
   a=input().split(" ")
   if a[0]=='0' and a[1]=='0':
      break
   d.append(int(a[0]))
   d.append(int(a[1]))
for i in range(0,len(d),2):
    if d[i]>d[i+1]:
      print(d[i+1],d[i])
    else:
      print(d[i],d[i+1])

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)