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

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

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

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

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

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

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):
s = []
while True:
    l = list(map(int,input().split()))
    if l == [0,0]:
        break
    else:
        l.sort()
        s.append(str(l[0]) + " " + str(l[1]))
for j in range(len(s)):
    print(s[j])

Solution (Python):
while True:
	[a, b] = [int(number) for number in input().split()];
	if (a == 0) & (b == 0):
		break;
	
	if (a < b):
		print(str(a) + ' ' + str(b));
	else:
		print(str(b) + ' ' + str(a));

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

Solution (Python):


import sys, math, os


PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


while True:
    a, b = [int(_) for _ in input().split()]
    if a == b == 0:
        break
    print(min(a, b), max(a, b))

Solution (Python):
dataset = []

while True:
    s = list(map(int,input().split()))
    try:
        if s[0] == 0 and s[1] == 0:
            break
        dataset.append(s)
    except:
        continue

for row in dataset:
    row.sort(key=int)
    print(row[0],row[1])

Solution (Python):
while True:
    x=input().split()
    if x == ["0","0"]:
        break
    x=list(map(int,x))
    x= sorted(x)
    a,b=x[0], x[1]
    print("{0} {1}".format(a,b))

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

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

    print('{} {}'.format(x, y))

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

Solution (Python):
import sys
 
while True :
    a, b = map(int, sys.stdin.readline().split())
    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):
while True:
  
  a,b=map(int,raw_input().split())
  if a==0 and b==0:
    break
  elif a<=b: 
    print a,b
  elif a>b:
    print b,a

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

Solution (Python):
while True:

  x, y = map(int, raw_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 == y == 0:
        break
    if x < y:
        small = x
        large = y
    else:
        small = y
        large = x
    print("{0} {1}".format(small, large))

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

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

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

    if (x == 0) & (y == 0) :
        break
    elif x > y :
        print(y, x)
    else :
        print(str(x) + " " + str(y))

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

Solution (Python):


while True:
    n = input().rstrip().split(" ")
    if n != ["0", "0"]:
        if int(n[0]) > int(n[1]):
            print(n[1] + " " + n[0])
        else:
            print(" ".join(n))
    else:
        break

Solution (Python):
I = input().split()
x = int(I[0])
y = int(I[1])
while x != 0 or y != 0:
    if x < y:
        print(str(x) + ' ' + str(y))
    if x > y:
        print(str(y) + ' ' + str(x))
    if x == y:
        print(str(x) + ' ' + str(y))
    I = input().split()
    x = int(I[0])
    y = int(I[1])

Solution (Python):
import sys

for line in range(3000):
    x,y = map(int,sys.stdin.readline().split())

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

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

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

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

Solution (Python):
a=0
b=0

while True:

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

    if a!=0 or b!=0:
        

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

        print(a,b)

    else:
        break

Solution (Python):
while 1:
    a,b=input().split()
    a=int(a);b=int(b)
    if a==0 and b==0:
        break
        
    elif a>b:
        c=a;a=b;b=c
    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(x,y)

Solution (Python):
while True:

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

  if a>b:
    print(b,a)

  elif b>a:
    print(a,b)

  elif a==b==0:
    break

  else:
    print(a,b)

Solution (Python):
while True:
    s = input()

    if s == "0 0":
        break
    else:
        print(" ".join(map(str, sorted(map(int, s.split())))))

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

Solution (Python):
nums1=[]
nums2=[]
while True:
    num=[]
    num=input().split()
    for i in range(0,len(num)):
        num[i]=int(num[i])
    if num[0]==0 and num[1]==0:
        break
    nums1.append(num[0])
    nums2.append(num[1])

for i in range(0,len(nums1)):
    if nums1[i]<nums2[i]:
        print(nums1[i],nums2[i])
    else:
        print(nums2[i],nums1[i])

Solution (Python):
for i in range(3000):
    x = list(input().split(" "))
    idx = 0
    if x[0] == "0" and x[1] == "0":
        break
    for j in x:
        x[idx] = int(j)
        idx += 1
    x.sort()
    print(x[0], x[1])

Solution (Python):
for i in range(3000):
    x = list(input().split(" "))
    if x[0] == "0" and x[1] == "0":
        break
    idx = 0
    for j in x:
        x[idx] = int(j)
        idx += 1
    x.sort()
    print(x[0], x[1])

Solution (Python):
result = []
while True:
    my_value = input()
    my_value_list = []
    my_value_list = ([int(x) for x in my_value.split()])
    my_value_list.sort()
    result.append(my_value_list)
    if my_value_list[0] == 0 and my_value_list[1] == 0:
        result.pop()
        break

for i in range(0, len(result)):
    print("{} {}".format(result[i][0], result[i][1]))

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

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

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 i in sys.stdin:
    a, b = sorted(map(int, i.split()))
    if a != 0 or b != 0:
        print(a, b)
    else:
        break

Solution (Python):
import sys
for xy in sys.stdin:
    x, y  = xy.split()
    if x == '0' and y == '0':
        break
    elif int(x) > int(y):
        x, y = y, x
    print('%s %s'%(x, y))

Solution (Python):
for cnt in range(3000):
    
    l = [int(i) for i in input().split()]
    
    if l == [0,0]:
        break
    else:
        l.sort()
        print (str(l[0]) + " " + str(l[1]))

Solution (Python):
while True:
    line = list(map(int, input().split()))
    if line == [0, 0]:
        break
    line.sort()
    print('%d %d' % tuple(line))

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

for line in sys.stdin:
    x, y = line.strip().split()
    if x == y == "0":
        break
    if int(x) > int(y):
        print y, x
    else:
        print x, y

Solution (Python):
import sys
while True:
    x = sys.stdin.readline().strip()
    if x == "0 0":
        break
    a = list(map(int, x.split()))
    a.sort()
    print("{} {}".format(a[0], a[1]))

Solution (Python):
x = []
y = []

i = 0

while True:
    indata = input().split()
    x.append(indata[0])
    y.append(indata[1])
    if int(x[i]) == 0 and int(y[i]) == 0:
        break
    i += 1

for j in range(len(x)):
    if int(x[j]) == 0 and int(y[j]) == 0:
        pass
    else:
        if int(x[j]) < int(y[j]):
            print("{0} {1}".format(x[j],y[j]))
        else:
            print("{0} {1}".format(y[j],x[j]))

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

while 1:
  x,y= sys.stdin.readline().split()
  if x == y == "0":
   break
  elif int(x)>int(y):
   print(y,x)
  else:
   print(x,y)

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

Solution (Python):
flag=0
c=0
while flag==0:
    a,b =[int(i) for i in input().split()]
    if a==0 and b==0:
        flag=1
        break
    if a>b:
        c=a
        a=b
        b=c
    print(a,b)

Solution (Python):
while True:
    l = [int(s) for s in input().split()]
    if sum(l) == 0:
        break
    print(' '.join([str(i) for i in sorted(l)]))

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):
n=[]
line=''
while line != [0,0]:
    line=list(map(int,input().split()))
    n.append(line)
for i in range(len(n)-1):
    print('%d %d'%(n[i][0] if n[i][0]<=n[i][1] else n[i][1],n[i][0] if n[i][0]>=n[i][1] else n[i][1]))

Solution (Python):
import sys
def main():
    for line in sys.stdin:
        x, y = map(int, line.split())
        if x == 0 and y == 0:
            break
        else:
            if x > y:
                tmp = y
                y = x
                x = tmp
            print(x, y)


if __name__ == "__main__":
    main()

Solution (Python):
S = raw_input().split(" ")
S[0] = int(S[0])
S[1] = int(S[1])

while S[0] != 0 or S[1] != 0:
  if(S[0] < S[1]):
    print(str(S[0]) + " " + str(S[1]))
  else:
    print(str(S[1]) + " " + str(S[0]))
  S = raw_input().split(" ")
  S[0] = int(S[0])
  S[1] = int(S[1])

Solution (Python):
while True:
	num = raw_input().split(" ")
	num1 = int(num[0])
	num2 = int(num[1])
	if num1 == 0 and num2 == 0:
		break
	elif num1 > num2:
		print("{0} {1}".format(num2, num1))
	else:
		print("{0} {1}".format(num1, num2))

Solution (Python):
def main():

    while True:
        [num_a, num_b] = sorted(list(map(int, input().split())))
        if num_a != 0 or num_b != 0:
            print('%d %d' % (num_a, num_b))
        else:
            break


main()

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

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

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

Solution (Python):

"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_3_C&lang=jp

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    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)


if __name__ == '__main__':
    main(sys.argv[1:])

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

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

Solution (Python):
def sort_num(x, y):
    n = [x, y]
    n.sort()
    print(n[0], n[1])

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

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

Solution (Python):


import fileinput
import math

def main():
    while True:
        line = input().strip()
        x, y = map(int, line.split())

        if (x == 0 and y == 0):
            break
        else:
            if (x > y):
                print('%d %d' % (y, x))
            else:
                print('%d %d' % (x, y))

if __name__ == '__main__':
    main()

Solution (Python):
import sys

while True:
    x, y = map(int, sys.stdin.readline().split())
    if (x == 0 )and (y == 0):
        break

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

Solution (Python):
w="yjsnpi"
a=[]
output=[]
while (w!="0 0"):
    w=input()
    b=w.split()
    x=int(b[0])
    y=int(b[1])
    if (x>y):
        output.append("{0} {1}".format(y,x))
    else:
        output.append("{0} {1}".format(x,y))
output.remove("0 0")
for k in output:
    print(k)

Solution (Python):
import sys
while 1:
    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):
i = 1
while i <= 3000:
    x,y = map(int, input().split())
    if (x == 0 and y == 0) or (x < 0 or 10000 < x) or (y < 0 or 10000 < y):
        break
    result = (str(x) + ' ' + str(y)) if x < y  else (str(y) + ' ' + str(x))
    print(result)
    i += 1

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

if __name__ == "__main__":
    main()

Solution (Python):
l = []
while True:
    N, M = map(int, input().split())
    if (N == 0 and M == 0):
        break;
    if (N > M):
        N, M = M, N
    l.append([N, M])

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

Solution (Python):
class DataSet:
    def __init__(self,x,y):
        self.x = x
        self.y = y

    def swap(self):
        temp = self.y
        self.y = self.x
        self.x = temp

def main():
    data = []
    while 1:
        
        n = input().split()
        x = int(n[0])
        y = int(n[1])

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

        data.append(DataSet(x, y))

    length = len(data)
    what_large = length > 3000

    if what_large:
        print("Too Large")
    else:
        for i in range(len(data)):
            d_val = data[i]
            if d_val.x > d_val.y:
                d_val.swap()

            print("{0} {1}".format(d_val.x,d_val.y))

if __name__ == '__main__':
    main()

Solution (Python):
a=[]
while True:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 x,y=map(int,s.split())
 if x>y:print(f'{y} {x}')
 else:print(s)

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

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

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

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

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

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

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

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

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

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

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 x,y=map(int,s.split())
 print(f'{y} {x}') if x>y else print(s)

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

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

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 x,y=map(int,s.split())
 print(y,x) if x>y else print(s)

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 x,y=map(int,s.split())
 print(y,x) if x>y else print(s)

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 x,y=map(int,s.split())
 print(y,x) if x>y else print(s)

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 x,y=map(int,s.split())
 print(f'{y} {x}') if x>y else print(s)

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 x=sorted(map(int,s.split()))
 print(*x)

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 x=sorted(map(int,s.split()))
 print(*x)

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 x=sorted(map(int,n.split()))
 print(*x)

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 x=sorted(map(int,n.split()))
 print(*x)

Solution (Python):
while 1:
 n = input()
 if n=='0 0':break
 print(*sorted(map(int,n.split())))

Solution (Python):
while 1:
 n = input()
 if n=='0 0':break
 print(*sorted(map(int,n.split())))

Solution (Python):
while 1:
 n = input()
 if n=='0 0':break
 print(*sorted(map(int,n.split())))

Solution (Python):
while 1:
 n = input()
 if n=='0 0':break
 print(*sorted(map(int,n.split())))

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 print(*sorted(map(int,s.split())))

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 print(*sorted(map(int,s.split())))

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 print(*sorted(map(int,s.split())))

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 print(*sorted(map(int,s.split())))

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 print(*sorted(map(int,s.split())))

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 print(*sorted(map(int,s.split())))

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 print(*sorted(map(int,s.split())))

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 x,y=map(int,s.split())
 print(f'{y} {x}') if x>y else print(s)

Solution (Python):
a=[]
while 1:
 n=input()
 if n=='0 0':break
 a.append(n)
for s in a:
 print(*sorted(map(int, s.split())))

Solution (Python):
a=[]
import sys
for s in sys.stdin:
 if s=='0 0\n':break
 a.append(s)
for t in a:
 x,y=map(int,t.split())
 print(f'{y} {x}') if x>y else print(t.strip())

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

Solution (Python):
a=[]
import sys
for s in sys.stdin:
 s=s.strip()
 if s=='0 0':break
 a.append(s)
for t in a:
 print(*sorted(map(int,t.split())))

Solution (Python):
a=[]
import sys
for s in sys.stdin:
 s=s.strip()
 if s=='0 0':break
 a.append(s)
for t in a:
 print(*sorted(map(int,t.split())))

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

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

Solution (Python):
while 1:
 a=input()
 if a=='0 0':break
 print(*sorted(map(int,a.split())))

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

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

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

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

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

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

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

    print('{} {}'.format(x, y))

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

Solution (Python):

import sys

inputs = [i.strip() for i in sys.stdin.readlines()]

for i in inputs:
    n = sorted(map(int, i.split()))
    if n[0] == 0 and n[1] == 0:
        break
    else:
        print(f"{n[0]} {n[1]}")

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

Solution (Python):
while True:
    a, b = sorted([int(i) for i in input().split()])
    if not(a or b):
        break
    print(a,b)

Solution (Python):
import sys
for i in sys.stdin.readlines():
        a, b = i.strip().split()
        if a == "0" and b == "0":
                break
 
        if int(a) < int(b):
                print("{} {}".format(a,b))
        else:
                print("{} {}".format(b,a))

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

Solution (Python):

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

Solution (Python):
while True:
	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):
import sys
for c in sys.stdin:
    a,b=sorted(map(int,c.split()))
    if a==0 and b==0:break
    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):
while True:
    instr = input()
    instrSp = instr.split()
    x = int(instrSp[0])
    y = int(instrSp[1])
    if x == 0 and y == 0:
        break
    else:
        if x < y:
            print("{x} {y}".format(x=x, y=y))
        else:
            print("{y} {x}".format(y=y, x=x))

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

Solution (Python):
while True:
	try:
		line = input()
		if line == '0 0':
			break	
		else:
			a,b = line.split(' ')
			if int(a) > int(b):
				print('{} {}'.format(b,a))
			else:
				print('{} {}'.format(a,b))
	except EOFError:
		break

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

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

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

Solution (Python):
count = 1
while(1):
    x = raw_input()
    if(x == "0 0"):
        break
    x = x.split(" ")
    x = map(int, x)
    x.sort()
    x = map(str, x)
    print " ".join(x)

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

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

Solution (Python):


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

Solution (Python):
def ex(x, y):
    if x > y:
        tmp = x
        x = y
        y = tmp

    return x, y

def ex2num():
    r1, r2 = input().split(" ")
    r1 = int(r1)
    r2 = int(r2)
    while (0 != r1) or (0 != r2):
        r1, r2 = ex(r1, r2)
        print(r1, r2)
        r1, r2 = input().split(" ")
        r1 = int(r1)
        r2 = int(r2)

    return 0

if __name__ == "__main__":
    ret = ex2num()

Solution (Python):
def ex2num():
    while (True):
        r1, r2 = input().split(" ")
        r1 = int(r1)
        r2 = int(r2)
        if (0 == r1) and (0 == r2):
            break
        if r1 < r2:
            print(r1, r2)
        else:
            print(r2, r1)

    return 0

if __name__ == "__main__":
    ret = ex2num()

Solution (Python):
def ex2num():
    while (True):
        r1, r2 = input().split(" ")
        r1 = int(r1)
        r2 = int(r2)
        if (0 == r1) and (0 == r2):
            break
        if r1 < r2:
            print(r1, r2)
        else:
            print(r2, r1)

    return 0

if __name__ == "__main__":
    ret = ex2num()

Solution (Python):
while True:
    x,y=input().split()
    x=int(x)
    y=int(y)
    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 = input().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(True):
    i,j=input().split()
    
    if i != '0' or j != '0':
        if int(i) <= int(j):
            print('{} {}'.format(i,j))
        else:
            print('{} {}'.format(j,i))
    else:
        break

Solution (Python):
while(True):
    i,j=input().split()
    
    if i != '0' or j != '0':
        if int(i) <= int(j):
            print(i+' '+j)
        else:
            print(j+' '+i)
    else:
        break

Solution (Python):
while(True):
    i,j= map(int, input().split())
    if i != 0 or j != 0:
        if i <= j:
            print(i,j)
        else:
            print(j,i)
    else:
        break

Solution (Python):
from sys import stdin
data = list(stdin)[:-1]
for line in data:
	tmp = list(map(int, line.strip('\n').split(' ')))
	tmp.sort()
	print(' '.join(map(str, tmp)))

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

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

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

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

Solution (Python):
while True:
    l = [int(x) for x in input().split( )]
    if l == [0,0]:
        break
    else:
        l.sort()
        print(*l)

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

Solution (Python):


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

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