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

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

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

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

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

Solution (Python):
for i in range(1,10001):
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    else:
        x=[a,b]
        x=sorted(x)
        print(x[0],x[1])

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

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

Solution (Python):

for i in range(3001):
    x, y =map(int,input().split())
    if x == 0 and y == 0:
        break

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

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

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

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

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

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

Solution (Python):
t=0
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):
for i in range(10000):
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        exit()
    print(min(x,y),max(x,y))

Solution (Python):
i = 0
data = []
buff =[]

while True:
    buff = list(map(int, input().split()))
    
    if buff == [0, 0]:
        break
    data.append(buff)
    data[i].sort()
    i += 1

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

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:
    try:
        a=list(map(int,input().split()))
        if a[0]==0 and a[1]==0:
            pass
        else:
            if a[0]>=a[1]:
                a[0],a[1]=a[1],a[0]
            print(a[0],a[1])
    except:
        break;

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

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

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

for i in range(len(list_x)):
   list_x[i],list_y[i]=sorted([list_x[i],list_y[i]])
   print(list_x[i],list_y[i])

Solution (Python):
t = 2
i = 0
while t != 0:
  i += 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):
x,y = map(int,input().split())

while x!=0 or y!=0:
    print(' '.join(map(str,sorted([x,y]))))
    x,y = map(int,input().split())

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

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

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

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

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

Solution (Python):
def resolve():
    res = []
    while True:
        x,y  = map(int,input().split())
        if x == y == 0:break
        res.append(sorted([x,y]))
    for i in range(len(res)):
        print(*res[i])

if __name__ == "__main__":
    resolve()

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

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

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

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

Solution (Python):
num = 0

while True:
    x,y = map(int,input().split())
    if x > y:
        num = y
        y = x
        x = num

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

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

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

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

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

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

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

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

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

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

Solution (Python):
data=[]

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

    if x[0] > x[1]:
        temp = x[0]
        x[0] = x[1]
        x[1] = temp

    data.append(x)

for i in data:
    print(*i)

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

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

Solution (Python):
a = []

for i in iter(input, '0 0'):
    j, k = (int(l) for l in i.split())
    if k < j:
        a.append([k, j])
    else:
        a.append([j, k])

for i in a:
    print(*i)

Solution (Python):




for i in range(1000000):
    val = input()
    array = list(map(int,val.split()))
    array.sort()
    if sum(array) == 0:
        break
    print('{} {}'.format(array[0],array[1]))

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

Solution (Python):



i = int()

for i in range(10000):
    D = list(map(int,input().split()))
    if D[0]==0 and D[1]==0:
        break
    D.sort()
    
    print(D[0],D[1])

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

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

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

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

    x, y = sorted([x, y])
    print(x, y)

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

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

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

Solution (Python):
n=1
i=[]
try:
    while n<=3000:
        a,b=map(int,input().split())
        if a==0 and b==0:
            break
        else:
            if a<b:
                i.append(str(a)+" "+str(b))
            else:
                i.append(str(b)+" "+str(a))
        n+=1
except EOFError:
    pass
i_n="\n".join(i)
print(i_n)

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

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

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

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

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

Solution (Python):
i = 0
for i in range(3000):
    input_x, input_y =(int(x) for x in input().split())
    
    if input_x == 0 and input_y == 0:
        break
    if input_x < input_y:
        print(input_x, input_y)
    else:
        print(input_y,input_x)

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

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

Solution (Python):
while True:
    x,y=raw_input().split()
    if(int(x)==0 and int(y)==0):
        break
    elif(int(x)>int(y)):
        print(str(y)+' '+str(x))
    else:
        print(str(x)+' '+str(y))

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

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

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

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

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

for i in range(len(list)):
    if list[i][0] >= list[i][1]:
        print(list[i][1],list[i][0])
    else:
        print(list[i][0],list[i][1])

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

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

Solution (Python):
for e in list(open(0))[:-1]:print(*sorted(map(int,e.split())))

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

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

Solution (Python):


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

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

    print(x,y)

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

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

Solution (Python):
def test_case():
    for i in range(1, 3001):
        li = list(map(int, input().split()))
        if li[0] == 0 and li[1] == 0:
            break

        if li[0] > li[1]:
            li[0], li[1] = li[1], li[0]
        print(li[0], li[1])


if __name__ == "__main__":
    test_case()

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

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

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

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

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 = (int(x) for x in input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        swp = x
        x = y
        y = swp
    print(x,end=' ')
    print(y)

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

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

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

Solution (Python):
def sort_ab(int_a, int_b):
    if int_a >= int_b:
        print('{} {}'.format(int_b, int_a))
    else:
        print('{} {}'.format(int_a, int_b))

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

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

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

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

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

Solution (Python):
while True:
    x , y = map(int,input().split())
    if x > y:
        w = x
        x = y
        y = w
    if x == 0 and y == 0:
        break;
    print(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):
cnt = 1
judge = True
while judge:
    li = list(map(int, input().split()))
    if li[0] == 0 and li[1] == 0:
        break
    li.sort()
    print(f"{li[0]} {li[1]}")
    cnt += 1

Solution (Python):

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


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

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

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

Solution (Python):
from sys import stdin

while True:
    x,y = map(int, stdin.readline().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 == 0 and y == 0:
    break

  elif  x > y :
    print("%d %d" %(y, x))
  else :
    print("%d %d" %(x, y))

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

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

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


if __name__ == "__main__":
    main()

Solution (Python):

while True:
    num = [int(x) for x in input().rstrip().split()]
    if num[0] ==0 and num[1] == 0:
        break
    num.sort()
    ans = " ".join(str(x) for x in num)
    print(ans)

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

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

Solution (Python):
l = []
while True:
    item = list(map(int, input().split()))
    if item == [0, 0]:
        break
    item = sorted(item)
    l.append(item)

for item in l:
    print(item[0], item[1])

Solution (Python):
for i in range(10000):
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        x,y = y,x
    print(f"{x} {y}")

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

Solution (Python):
def main():
    while True:
        a, b = (int(e) for e in input().split())
        if a == 0 and b == 0:
            break
        elif a < b:
            print(a, b)
        else:
            print(b, a)

main()

Solution (Python):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        exit()
    
    if a > b:
        a, b = b, a
    print (f'{a} {b}')

Solution (Python):
l = []
while True:
    try:
        a = list(map(int, input().split()))
        l.append(a)   
    except EOFError:
        break
    
for i in range(len(l)-1):
    x, y = l[i]
    if x >= y:
        print(y, x)
    
    else:
        print(x, y)

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

    if x > y:
        print(f"{y} {x}")
    else:
        print(f"{x} {y}")

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

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

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

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

    if x == 0 and y == 0:
        break
    print(str(list[0]) + ' ' + str(list[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):
Inlist=[]

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

for IN in Inlist:
    IN.sort()
    print('{} {}'.format(IN[0], IN[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):
for i in range(1,3001):
    x,y=input().split()
    x=int(x)
    y=int(y)
    if x==0 and y==0:
        break
    else:
        if x<=y:
            print(x,y)
        else:
            print(y,x)

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

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

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

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

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

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

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

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

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

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

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

    print(*sorted(Lists))

Solution (Python):
x, y = -1, -1

for i in range(3000):
    x, y = map(int, input().split())
    if x==0 and y==0:
        break
    elif x <= y:
        print("{} {}".format(x, y))
    elif y < x:
        print("{} {}".format(y, x))

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

Solution (Python):
while True:
	a,b=map(int,input().split())
	if a==0 and b==0:
		exit(0)
	x1 =a
	x2 =b
	if a>b:
		x1 = b
		x2 = a
	print('{0} {1}'.format(x1,x2))

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

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

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

for i in result:
    print(i)

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

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

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

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

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

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

    if x == 0 and y == 0:
        break
    elif x > y:
        x, y = y, x
    print(x, y)

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

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

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