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):
N = []
while True:
	a = list(map(int, input().split(' ')))
	if a[0] == 0 and a[1] == 0:
		break
	a.sort()
	N.append(a)
	
for i in range(len(N)):
	print(N[i][0], N[i][1])

Solution (Python):

l=raw_input()
k=l.split()
k.sort()
f=0

while f==0:
        a=int(k[0])
        b=int(k[1])
        if a==b==0:
                break
        else:
                if a<b:
                        print a,b
                else:
                        print b,a
        l=raw_input()
        k=l.split()
        k.sort()

Solution (Python):
while 1:
    line=map(int,raw_input().split())
    if line==[0,0]:
        break
    else:
        op=sorted(line)
        print op[0],op[1]

Solution (Python):
tmp = 0
while True:
    i = raw_input().strip().split()
    a = int(i[0])
    b = int(i[1])
    if a == 0 and b == 0:
        break
    if a > b:
        tmp = a
        a = b
        b = tmp
    print a,b

Solution (Python):


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

Solution (Python):

import sys
i = sys.stdin

for line in i:
    a,b = map(int,line.split())
    if a == 0 and b == 0: break
    if a < b:
        print(a,b)
    else:
        print(b,a)

Solution (Python):
input_array=[]

while True:
    a, b = [int(x) for x in raw_input().split(" ")]

    if a == 0 and b == 0:
        break
    elif a > b:
        tmp = a
        a = b
        b = tmp

    input_num = str(a) + " " + str(b)
    input_array.append(input_num)

for x in range(0,len(input_array)):
    print(input_array[x])

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

Solution (Python):



i = 1
x = 1
y = 1
while x != 0 or y != 0:
    xy = raw_input().split()
    x = int(xy[0])
    y = int(xy[1])
    if x == 0 and y ==0:
        break
    if x < y :
        print x,y
    else:
        print y,x

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

while 1:
    x = sys.stdin.readline().strip()
    x_list = list(map(int,x.split(" ")))
    
    if x_list[0] == 0 and x_list[1] == 0 :
        break
    
    x_list.sort()
    print(x_list[0],x_list[1])

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

Solution (Python):


def main(): 
	nums = []
	while True:
		x = input().split(" ")
		if x == ["0","0"]:
			break
		x.sort(key = int)
		nums.append(x)
	for i in nums:
			print(" ".join(i))
if __name__ == '__main__':
  main()

Solution (Python):
import sys
for i in sys.stdin:
  x, y = map(int, i.split())
  if (x, y) == (0, 0): break
  elif x <= y:
    print(x, y)
  else:
    print(y, x)

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

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

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

Solution (Python):
a, b = map(int, raw_input().split())

for i in xrange(10000) :

    print str(min(a, b)) + ' ' + str(max(a, b))

    a, b = map(int, raw_input().split())

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

Solution (Python):
while True:
    x = input().split()
    a = int(x[0])
    b = int(x[1])
    if a == 0 and b == 0:
        break
    elif a > b:
        print('{0} {1}'.format(b, a))
    else:
        print('{0} {1}'.format(a, b))

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

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

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

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

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

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

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

Solution (Python):
import sys
def number():
    a = []
    b = []
    i = 0
    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(len(a)):
        if a[j] < b[j]:
            print (a[j],b[j])
        else:
            print (b[j],a[j])

if __name__ == "__main__":
    number()

Solution (Python):
while(True):
    x, y = map(int, 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):
    list = map(int, raw_input().split())
    x = list[0]
    y = list[1]
    if ((x == 0) and (y == 0)):
        break
    else:
        if x <= y:
            print '%d %d'%(x, y)
        else:
            print '%d %d'%(y, x)

Solution (Python):

while True :
	line = list( map(int, input().split(' ')))

	line.sort()

	if(line[0] == 0 and line[1] == 0) :
		break;
	print('{0} {1}'.format(line[0], line[1]))

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

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

Solution (Python):
a = []
while True:
    x = map(int, raw_input().split())
    if x[0] == 0 and x[1] == 0:
        break
    if x[0] > x[1]:
        tmp = x[1]
        x[1] = x[0]
        x[0] = tmp
    a.append([x[0], x[1]])
for i in range(len(a)):
    print a[i][0], a[i][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 1:
    x, y = map(int, input().split())
    if x == y == 0: break
    print("{} {}".format(min(x,y), max(x,y)))

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

Solution (Python):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    else:
        print("{a} {b}".format(a=min(a,b), b=max(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):
i = 0
while 1:
        w  = map(int,raw_input().split())
        w.sort()
        if w[0] == 0 and w[1] == 0:
                break
        print "%d %d" %(w[0],w[1])

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

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

    if x > y:
        x, y = y, x

    print(x, y)

Solution (Python):
while True:
    x, y = [int(i) for i in input().split()]

    if x == y == 0:
        break

    if x > y:
        x, y = y, x

    print(x, y)

Solution (Python):
while True:
    x, y = [int(i) for i in input().split()]

    if x == y == 0:
        break

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

Solution (Python):
while True:
    x, y = [int(i) for i in input().split()]

    if x == y == 0:
        break

    if x > y:
        x, y = y, x

    print(x, y)

Solution (Python):
while True:
    x, y = [int(i) for i in input().split()]

    if x == y == 0:
        break

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

Solution (Python):
while True:
    x, y = [int(i) for i in input().split()]

    if x == y == 0:
        break

    if x > y:
        x, y = y, x

    print(x, y)

Solution (Python):
while True:
  x, y = [int(i) for i in input().split()]

  if x == y == 0:
      break
 
  if x > y:
      x, y = y, x

  print(x, y)

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

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

Solution (Python):
while True:
    x, y = [int(i) for i in input().split()]

    if x == y == 0:
        break

    if x > y:
        x, y = y, x

    print(x,y)

Solution (Python):
import sys
while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split()]
    if x == 0 == y:
        break
    if x > y:
        z = x
        x = y
        y = z
 
    print(x, y)

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

Solution (Python):
while True:
    x,y  =[int(i) for i in input().split()]

    if x == y == 0:
       break

    if x > y:
        x,y = y,x

    print(x,y)

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

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:
    list=[int(x) for x in input().split()]
    if any(list):
        [a,b]=sorted(list)
        print(str(a)+" "+str(b))
    else:
        break

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

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

Solution (Python):
while 1:
	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:
	n = input().split()
	a = int(n[0])
	b = int(n[1])
	if a == 0 and b == 0:
		break
	if a > b:
		bf = a
		a = b
		b = bf
	print(str(a) + " " + str(b))

Solution (Python):
import string

while True:
    L = string.split(raw_input())
    x = int(L[0])
    y = int(L[1])
    if x == 0 and y == 0: break
    
    if x < y:
        print x,y
    else:
        print y,x

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

Solution (Python):
import sys

n = sys.stdin.readlines()
for i in n:
    a = [int(x) for x in i.split()]
    if a[0] == 0 and a[1] == 0:
        break
    print(*sorted(a))

Solution (Python):
import sys

n = sys.stdin.readlines()
for i in n:
    a, b = [int(x) for x in i.split()]
    if a == 0 and b == 0:
        break
    if a < b:
        print(a, b)
    else:
        print(b, a)

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

Solution (Python):
while True:
	n,k = map(int, raw_input().split())
	if 0==n and 0==k:
		break
	if n > k:
		print k,n
	else:
		print n,k

Solution (Python):
def swap(a, b ,item):
    c = item[a]
    item[a] = item[b]
    item[b] = c
    
AB = input().split()
a = int(AB[0])
b = int(AB[1])
while a!=0 or b!=0:
    if a>b:
        swap(0, 1, AB)
    print(int(AB[0]), int(AB[1]))
    AB = input().split()
    a = int(AB[0])
    b = int(AB[1])

Solution (Python):
small = []
large = []

while True:
	input_a, input_b = map(int, raw_input().split())
	if input_a == 0 and input_b == 0:
		break
	else:
		if input_a < input_b:
			small.append(input_a)
			large.append(input_b)
		else:
			small.append(input_b)
			large.append(input_a)

for (n, m) in zip(small, large):
		print n, m

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

Solution (Python):
import sys

while True:
    data = sys.stdin.readline().strip().split(' ')
    x = int(data[0])
    y = int(data[1])
    if x == 0 and y == 0:
        break
    if x < y:
        print('%d %d' % (x, y))
    else:
        print('%d %d' % (y, x))

Solution (Python):
while 1:
    x,y = map(int, raw_input().split())

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

    if x>y:
        box = x
        x = y
        y = box

    print x,y

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

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

Solution (Python):
a = []
while True:
    d = list(map(int, input().split()))
    if d == [0,0]:
        break
    d.sort()
    a.append(d)
for x in a:
    print('{} {}'.format(x[0],x[1]))

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

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

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

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

Solution (Python):


def Swap(a):
    for i in range(len(a)):
        if a[i] == "0 0":
            break
        x = int(a[i].split(" ")[0])
        y = int(a[i].split(" ")[1])
        box = 0
        if x > y:
            box = x
            x = y
            y = box
        print(str(x)+" "+str(y))

if __name__=="__main__":
    a = []
    for i in range(3000):
        a.append(input())
        if a[i] == "0 0":
            break
    Swap(a)

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

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

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

Solution (Python):


import sys

for line in sys.stdin.readlines():
    x, y = line.strip().split()

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

    if int(x) < int(y):
        print("{} {}".format(x, y))
    else:
        print("{} {}".format(y, x))

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

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

Solution (Python):
L1= []
L2= []
N= 0
while True:
	x,y= map(int,input().split())
	if(x==y==0):
		break
	if(x> y):
		x,y= y,x
	L1.append(x)
	L2.append(y)
	N= N+1

for i in range(N):
	print(L1[i],L2[i])

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

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

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

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

Solution (Python):
import sys

for s in sys.stdin:
  a,b = sorted(map(int, s.split()))
  if a == 0 and b == 0:
    break
  print(a,b)

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

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 = [int(n) for n in input().split()]
  if x == 0 and 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 == y == 0):
        break
    if(x <= y):
        print("%d %d" % (x, y))
    else:
        print("%d %d" % (y, x))

Solution (Python):



import fileinput

if __name__ == '__main__':
    for line in fileinput.input():
        tokens = line.strip().split()
        a, b = int(tokens[0]), int(tokens[1])
        if a == b == 0:
            pass
        elif a <= b:
            print '%d %d' % (a, b)
        elif b < a:
            print '%d %d' % (b, a)

Solution (Python):


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

while not(x==0 and y==0):
    if x>y:
        x,y=y,x
    print(str(x)+" "+str(y))

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

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 = []
cnt = 0
while 1:
    x = input()
    if x == '0 0':
        break
    l.append(x)
    cnt += 1
for i in range(cnt):
    f = list(map(int,l[i].split()))
    f.sort()
    print(f[0],f[1],sep=' ')
    del f[:]

Solution (Python):
while True:
    x = input()
    x = x.split(" ")
    x = [int(z) for z in x]
    if x[0] == 0 and x[1] == 0: break
    if x[0] < x[1]:
        print("%d %d" % (x[0], x[1]))
    else:
        print("%d %d" % (x[1], x[0]))

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

Solution (Python):
while 1:
    x, y = [int(a) for a in input().split(" ")]
    if x == 0 and y == 0: break
    print(" ".join([str(b) for b in sorted([int(c) for c in [x, y]])]))

Solution (Python):
import sys

for line in sys.stdin:
    [a, b] = [int(x) for x in line.split()]

    if [a, b] == [0, 0]:
        break

    if b < a:
        print(" ".join([str(x) for x in [b, a]]))
    else:
        print(" ".join([str(x) for x in [a, b]]))

Solution (Python):
import sys
while(True):
    x, y =  map(lambda x: (int, int)[x.isdigit()](x) ,sys.stdin.readline().split(None, 1))
    if x == 0 and 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 == 0:
        break
    if a > b:
        t=a
        a=b
        b=t
    print("{0} {1}".format(a,b))

Solution (Python):
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):
matrix = []
while True:
    values = input()
    i_list = [int(x) for x in values.split()]
    if 2 == i_list.count(0):
        break
    matrix.append(i_list)

for i in matrix:
    a, b = sorted(i)
    print(a, b)

Solution (Python):
'''
ITP-1_3-C
 2 ????????°?????????
???????????´??° x, y ?????????????????????????????????????°?????????????????????????????????°?????????????????????????????????
?????????????????????????????\?????????????????????????????????????????????????????????????????????????????¨?????¨?????????????????????
???Input
??\???????????°????????????????????????????§?????????????????????????????????????????????????????????§??????????????????????????´??° x, y ?????????
?????????????§?????????????????????????
???Output
??????????????????????????¨??????x ??¨ y ????°????????????????????????????????????????????????????????????????x ??¨ y ????????????????????????????????\??????????????????
'''

import sys


for inputData in sys.stdin:
    inputData = inputData.split(" ")
    inputData01, inputData02 = int(inputData[0]), int(inputData[1])
    
    if inputData01 == 0:
        if inputData02 == 0:
            break

    if inputData01 > inputData02:
        outputData01 = inputData02
        outputData02 = inputData01
    else:
        outputData01 = inputData01
        outputData02 = inputData02

    
    print((outputData01), (outputData02))

Solution (Python):
if __name__ == '__main__':
    while True:
        key_in = input()
        
        data = [int(x) for x in key_in.split(' ')]
        data.sort()

        if data[0] == 0 and data[1] == 0:
            break
        else:
            print('{0} {1}'.format(data[0], data[1]))

Solution (Python):
data = input().split()
a = int(data[0])
b = int(data[1])
while(a != 0 or b != 0):
	if a > b:
		temp = a
		a = b
		b = temp
	print(str(a) + " " + str(b))
	data = input().split()
	a = int(data[0])
	b = int(data[1])

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):
for i in range(1, 10000):
    x, y = map(int, input().split())
    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
  elif x > y:
    x,y = y,x
    print(x,y)
  else:
    print(x,y)

Solution (Python):
x=[]
y=[]
while True:
    i,j=map(int,raw_input().split())
    if (i,j)==(0,0):
        break;
    x.append(i)
    y.append(j)
X=iter(x)
Y=iter(y)

for a in X:
    b=Y.next()
    if a<b:
        print('%d %d'%(a,b))
    else:
        print('%d %d'%(b,a))

Solution (Python):
for i in range(1,3001):
    x, y = [int(i) for i in input().split()]
    if x + y == 0:
        break
    elif x>y:
        print(y,x)
    elif x<y:
        print(x,y)
    else:
        print(x,y)

Solution (Python):
x,y=input().split()
while (x!='0'or y!='0'):
    if(int(x)>int(y)):print("{} {}".format(y,x))
    else:print("{} {}".format(x,y))
    x,y=input().split()

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

    a.sort()
    print("{} {}".format(a[0], a[1]))

Solution (Python):
import sys

while True:
 x, y = map(int,sys.stdin.readline().split())
 if (x == 0) & (y == 0):
  break
 elif x < y :
  print(x, y)
 else : 
  print(y, x)

Solution (Python):



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

Solution (Python):
import sys


list_line = sys.stdin.readlines()

for index, element in enumerate(list_line):
    list_line[index] = element.rstrip('\n')

for element in list_line:
    x_y_list = element.split(" ")
    x = int(x_y_list[0])
    y = int(x_y_list[1])
    if x == 0 and y == 0:
        sys.exit()
    if x > y:
        print(str(y) + " " + str(x))
    else:
        print(element)

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

Solution (Python):
dataset = []
while True:
    x, y = map(int, input().split())
    if (x < 0 and x > 10000) and (y < 0 and y > 10000):
        break
    elif (x is 0) and (y is 0): 
        break

    listed = []
    listed.append(x)
    listed.append(y)
    dataset.append(listed)
    if len(dataset) >= 3000:
        break

for i in dataset:
    if i[0] > i[1]:
        print("{0} {1}".format(str(i[1]), str(i[0])))
    elif i[0] < i[1]:
        print("{0} {1}".format(str(i[0]), str(i[1])))
    else:
        print("{0} {1}".format(str(i[0]), str(i[1])))

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

Solution (Python):
import sys
 
while True:
 x, y = map(int,sys.stdin.readline().split())
 if (x == 0) & (y == 0):
  break
 elif x < y :
  print(x, y)
 else : 
  print(y, x)

Solution (Python):
import sys
 
while True:
 x, y = map(int,sys.stdin.readline().split())
 if (x == 0) & (y == 0):
  break
 elif x < y :
  print(x, y)
 else : 
  print(y, x)

Solution (Python):
import sys
 
while True:
 x, y = map(int,sys.stdin.readline().split())
 if (x == 0) & (y == 0):
  break
 elif x < y :
  print(x, y)
 else : 
  print(y, x)

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

Solution (Python):
import sys
while True :
    a,b = sys.stdin.readline().split()
    a = int(a)
    b = int(b)
    if a == 0 and b == 0 :
        break
    elif a > b :
        print(b,a)
    else :
        print(a,b)

Solution (Python):
import sys
while True :
    ab = list(map(int,sys.stdin.readline().split()))
    a = ab[0]
    b = ab[1]
    if a == 0 and b == 0 :
        break
    elif a > b :
        print(b,a)
    else :
        print(a,b)

Solution (Python):
import sys
while True :
    ab = list(map(int,sys.stdin.readline().split()))
    a = ab[0]
    b = ab[1]
    if a == 0 and b == 0 :
        break
    else :
        ab = sorted(ab)
        print(ab[0],ab[1])

Solution (Python):
def method(a,b):
    if(a<b):
        print a,b
    else:
        print b,a

while 1:
    a,b=map(int,raw_input().split())
    if a==0 and b==0:
        break
    method(a,b)

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

for ls in num:
    ls.sort()
    print('{} {}'.format(ls[0], ls[1]))

Solution (Python):
dataset = []
while True:
    x, y = map(int, input().split())
    if (x < 0 and x > 10000) and (y < 0 and y > 10000):
        break
    elif (x is 0) and (y is 0): 
        break

    listed = []
    listed.append(x)
    listed.append(y)
    dataset.append(listed)
    if len(dataset) >= 3000:
        break

for i in dataset:
    if i[0] > i[1]:
        print("{0} {1}".format(str(i[1]), str(i[0])))
    elif i[0] < i[1]:
        print("{0} {1}".format(str(i[0]), str(i[1])))
    else:
        print("{0} {1}".format(str(i[0]), str(i[1])))

Solution (Python):

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

    if (a == 0) & (b == 0):
        break
    if a <= b:
        print(a, b)
    else:
        print(b, a)

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):
import sys
count = 1
while True:
    x, y = sys.stdin.readline().strip().split()
    if x == '0' and y == '0':
        break
    elif int(x) < int(y):
        print("%s %s" % (x, y))
    else:
        print("%s %s" % (y, x))
    count += 1

Solution (Python):
while 1:
    x, y = map(int, raw_input().split())
    if x == 0 and y == 0:
        break
    if x <= y :
        print '%s %s' % (x, y)
    else:
        print '%s %s' % (y, x)

Solution (Python):
list = []

while True:
    a, b = [int(i) for i in input().split()]
    if a == 0 and b == 0:
        break
    if a < b:
        list.append([a,b])
    else:
        list.append([b,a])

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

Solution (Python):

i = 0
j = 0
lis = []
while True:
    x,y = input().split()
    x = int(x)
    y = int(y)
    if x > y:
        i = x
        x = y
        y = i

    if x == 0 and y == 0:
        break
    fmt = "{a} {b}"
    s = fmt.format(a = x,b = y)
    lis.append(s)
    j += 1

for i in range(j):
    print(lis[i])

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

Solution (Python):
while 1:
    x,y=map(int,input().split())
    if not x+y:break
    print(*[y,x] if x>y else [x,y])

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

Solution (Python):
import sys
for c in sys.stdin:
    a,b=sorted(map(int,c.split()))
    if a==b==0:break
    print(a,b)

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

Solution (Python):
import sys
for c in sys.stdin:
    a,b=sorted(map(int,c.split()))
    if a+b==0:break
    print(a,b)

Solution (Python):
import sys
while 1:
    (a,b)=[int(c)for c in sys.stdin.readline().split(' ')]
    if a==0 and b==0:break
    if a>b:a,b=b,a
    print(a,b)

Solution (Python):
import sys
   
a = []
for line in sys.stdin:
    x,y = map(int,line.split(" "))
    if x == 0 and y == 0:
      break
    item = [x,y]
    item.sort()
    a.append(item)
   
for x,y in a:
  print "%s %s" %(x,y)