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

Solution (Python):
import fileinput

for line in fileinput.input():
    tokens = list(map(int, line.strip().split()))
    tokens.sort()
    a, b = tokens[0], tokens[1] 
    if a == 0 and b == 0:
        break
    else:
        print(a, b)

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

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

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

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

    print(x, y)

Solution (Python):
def sort_two_numbers(a, b):
    """
    a: int
    b: int
    returns a sorted list

    >>> sort_two_numbers(1, 3)
    [1, 3]
    >>> sort_two_numbers(3, 1)
    [1, 3]
    """
    result = []
    
    if a < b:
        result.append(a)
        result.append(b)
    else:
        result.append(b)
        result.append(a)

    return result

if __name__ == '__main__':



    while True:
        try:
            (a, b) = [int(i) for i in input().split(' ')]
            if a == 0 and b == 0:
                break
            print('{0[0]} {0[1]}'.format(sort_two_numbers(int(a), int(b))))
        except EOFError:
            break

Solution (Python):
a=1
while 1:
	l = map(int,raw_input().split())
	if l == [0,0]:
		break
	else :
		print ' '.join(map(str,sorted(l)))
		a += 1

Solution (Python):


def string_two_numbers_spliter():
    x, y = [int(i) for i in input().split()]
    return x, y


def swap_two_numbers_asc(x, y):
    x, y = y, x
    return x, y


def main():
    while True:
        x, y = string_two_numbers_spliter()
        if x == 0 and y == 0:
            break
        if x > y:
            x, y = swap_two_numbers_asc(x, y)
        print('%d %d' % (x, y))


if __name__ == '__main__':
    main()

Solution (Python):


def string_two_numbers_spliter():
    x, y = [int(i) for i in input().split()]
    return x, y


def swap_two_numbers_asc(x, y):
    x, y = y, x
    return x, y


def main():
    while True:
        x, y = string_two_numbers_spliter()
        if x == 0 and y == 0:
            break
        if x > y:
            x, y = swap_two_numbers_asc(x, y)
        print('%d %d' % (x, y))


if __name__ == '__main__':
    main()

Solution (Python):


def string_two_numbers_spliter():
    x, y = [int(i) for i in input().split()]
    return x, y


def swap_two_numbers_asc(x, y):
    x, y = y, x
    return x, y


def main():
    while True:
        x, y = string_two_numbers_spliter()
        if x == 0 and y == 0:
            break
        if x > y:
            x, y = swap_two_numbers_asc(x, y)
        print('%d %d' % (x, y))


if __name__ == '__main__':
    main()

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

Solution (Python):
while True:
  a = list(map(int, input().split()))
  if sum(a) == 0:
    break
  print(' '.join(list(map(str, sorted(a)))))

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

Solution (Python):
while 1:
    line = input()
    words = line.split()
    x = words[0]
    y = words[1]
    if (x == '0') and (y == '0'):
        break
    elif int(x) > int(y):
        print(y + " " + x)
    else:
        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)
    else:
        print(b,a)

Solution (Python):
while True:
	s = raw_input().rstrip().split(" ")
	if s[0]=="0" and s[1]=="0":break
	if int(s[0])>int(s[1]):print s[1]+" "+s[0]
	else:print s[0]+" "+s[1]

Solution (Python):
if __name__ == "__main__":
    while True:
        x,y = map(int,input().split())
        if x is not 0 or y is not 0 :
            if x > y:
                tmp = x
                x = y
                y = tmp
            print("%d %d"%(x,y))
        else:
            break

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

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

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

Solution (Python):
import sys

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

Solution (Python):
a=[]
while True:
    m,n=input().split()
    if m==n=="0":
        break
    else:
        a.append(sorted([int(m),int(n)]))
for i in range(len(a)):
    print("{0} {1}".format(a[i][0],a[i][1]))

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

Solution (Python):
import sys

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

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

    if x == y == '0' :
        break
    x = int(x)
    y = int(y)
    if x < y : print(x, y)
    else     : print(y, x)

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

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

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

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

Solution (Python):
count = -1
a = []
while True:
    count += 1
    n = input()
    if n == "0 0":
        break
    a.append(n.split())
    if int(a[count][0]) <= int(a[count][1]):
        print(a[count][0]+" "+a[count][1])
    else:
        print(a[count][1]+" "+a[count][0])

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

Solution (Python):
import sys
import math
for i in sys.stdin.readlines():
    i = i.rstrip()
    i = i.split()
    x = int(i[0])
    y = int(i[1])
    if x == 0 and y == 0:
        break
    print(str(min(x,y))+" "+str(max(x,y)))

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

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

Solution (Python):
while True:
	s = input().rstrip().split(' ')
	x = int(s[0])
	y = int(s[1])
	if x == 0 and y == 0: break
	if x > y:
		x,y = y,x
	print(str(x) + " " + str(y))

Solution (Python):
array = []
while 1:
    n = input()
    if n == "0 0":
        break
    array.append(n.split())
for i in range(len(array)):
    if int(array[i][0]) > int(array[i][1]):
        print(array[i][1]+" "+array[i][0])
    else:
        print(array[i][0]+" "+array[i][1])

Solution (Python):
from sys import stdin

for test_case in range(3000 + 2):
    x, y = map(int, stdin.readline().split())

    if not(x + y):
        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
    print(min(x,y), max(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)
    elif x >= y:
     print(y, x)

Solution (Python):


import sys
import os

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

Solution (Python):


list = []

while True:
    num = input().rstrip().split(" ")
    if int(num[0]) == 0 and int(num[1]) == 0:
        break
    list.append(num)


for i in range(len(list)):
    if int(list[i][0]) <= int(list[i][1]):
        print(str(list[i][0]) + " " + str(list[i][1]))
    else:
        print(str(list[i][1]) + " " + str(list[i][0]))

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 1:
    l = list(map(int,input().split()))
    if (l[0] == 0 and l[1] == 0):
        break
    l.sort()
    print(" ".join(map(str,l)))

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

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

Solution (Python):
x = 1
y = 1
i = 0
while x!=0 or y!=0:
	i+=1
	x,y = [int(i) for i in input().split()]
	if x!=0 or y!=0:
		if x <= y:
			print("{0} {1}".format(x,y))
		else:
			print("{0} {1}".format(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):

x=[]
while True:
    A, B= map(int, input().split())   
    if A==0 and B==0:
        break
    else:
        if A > B:
            print(B,A)
        else:
            print(A,B)

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

    if a == 0 and b == 0:
        break
    else:
        if a > b:
            temp = a
            a = b
            b = temp
        print(str(a) + " " + str(b))

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

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

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

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

Solution (Python):



def func():
    result = ""
    
    while (True):
        try:
            line = input().rstrip()
            numbers = line.split(" ")
            for i,item in enumerate(numbers):
                numbers[i]=int(item)
                
        except:
            print("input error")
            return -1
        
        numbers.sort()
        
        bool=True
        resultsub = ""
        for item in numbers:
            bool = bool and (item == 0)
            resultsub += str(item)+" "

        if(bool):
            break

        result += resultsub.rstrip(" ")+"\n"

    print(result.rstrip())

func()

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):
newArray = []

x, y = input().split()

while x + y != "00":
    x = int(x)
    y = int(y)
    if x < y or x == y:
        newArray.append([str(x), str(y)])
    else:
        newArray.append([str(y), str(x)])
    x, y = input().split()

for i in range(len(newArray)):
    print(newArray[i][0] + " " + newArray[i][1])

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

Solution (Python):
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
        break
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)

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

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

Solution (Python):
str_num = input()
while str_num != "0 0":
    num = sorted([int(x) for x in str_num.split(" ")])
    print("{} {}".format(num[0],num[1]))
    str_num = input()

Solution (Python):

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

Solution (Python):


li = [1,1]

while sum(li)>0:
    li = list(map(int,input().rstrip().split()))
    lis=sorted(li)
    
    if sum(li)==0:
        break
    print(" ".join(map(str,lis)))

Solution (Python):
from sys import stdin

for line in stdin:
    a, b = map(int, line.rstrip().split(' '))

    if 0 == a == b:
        break

    if a < b:
        print(a, b)
    else:
        print(b, a)

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

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

Solution (Python):
L = []
x,y = map(int, input().split())
while x != 0 or y != 0:
 L.append([x, y])
 x,y = map(int, input().split())

for i in L:
 i.sort()
 print(str(i[0]) + " " + str(i[1]))

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

Solution (Python):
import sys

while(True):
    x,y = map(int, sys.stdin.readline().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:
		if x > y:
			print(y,x)
		else:
			print(x,y)

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

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

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

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

Solution (Python):
for i in range(3000):
    s = input().split(" ")
    x = int(s[0])
    y = int(s[1])
    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 = sorted(map(int, line.rstrip().split(' ')))
    if x==0 and y==0:
        break
    print("{} {}".format(x,y))

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

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

Solution (Python):
end = True

while end:
    data = input().split()
    data1 = int(data[0])
    data2 = int(data[1])
    if data1 == 0 and data2 ==0:
        end = False
    elif data1 <= data2:
        print(data1, data2)
    else:
        print(data2,data1)

Solution (Python):
while True:
    x, y = [int(n) for n in input().split()]
    if not (x or y):
        break
    if x < y:
        print(x, y)
    else:
        print(y, x)

Solution (Python):
for i in range(1, 10001):
    l = list(map(int,input().split()))
    if not any(l):
        break
    print(" ".join(map(str, sorted(l))))

Solution (Python):
import sys

while 1:
  str = sys.stdin.readline().strip()
  if str=="0 0":
    break
  print(" ".join(sorted(str.split(" "), key=int)))

Solution (Python):
import sys

while 1:
  str = sys.stdin.readline().strip()
  if str=="0 0":
    break
  a , b = sorted(str.split(" "), key=int)
  print(a,b)

Solution (Python):
import sys

while 1:
  str = sys.stdin.readline().strip()
  if str=="0 0":
    break
  a , b = sorted(str.split(" "), key=int)
  print(a,b)

Solution (Python):
import sys

while 1:
  str = sys.stdin.readline().strip()
  a , b = sorted(str.split(" "), key=int)
  if a =="0" and b == "0":
    break
  print(a,b)

Solution (Python):
import sys

while 1:
  str = sys.stdin.readline().strip()
  a , b = sorted(str.split(" "), key=int)
  if a =="0" and b == "0":
    break
  print(a,b)

Solution (Python):
import sys

while 1:
  str = sys.stdin.readline().strip()
  a , b = sorted(str.split(" "), key=int)
  if a == b == "0":
    break
  print(a,b)

Solution (Python):
import sys

while 1:
  a , b = sorted(sys.stdin.readline().strip().split(" "), key=int)
  if a == b == "0":
    break
  print(a,b)

Solution (Python):
import sys

while 1:
  a , b = sorted(sys.stdin.readline().strip().split(" "), key=int)
  if a == b == "0":
    break
  print(a,b)

Solution (Python):
import sys

while 1:
  a , b = map(int, sys.stdin.readline().split())
  if a == b == 0:
    break
  elif a > b :
    print(b,a)
  else :
    print(a,b)

Solution (Python):
import sys
from time import sleep
sleep(1)

while 1:
  a , b = map(int, sys.stdin.readline().split())
  if a == b == 0:
    break
  elif a > b :
    print(b,a)
  else :
    print(a,b)

Solution (Python):
import sys
from time import sleep
sleep(5)

while 1:
  a , b = map(int, sys.stdin.readline().split())
  if a == b == 0:
    break
  elif a > b :
    print(b,a)
  else :
    print(a,b)

Solution (Python):
import sys

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

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

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

Solution (Python):

for c in range(3000):
    l = input().strip().split()
    x = int(l[0])
    y = int(l[1])
    if((x < 1) and (y < 1)):
        break
    elif(x > y):
        print("{0} {1}".format(y,x))
    else:
        print("{0} {1}".format(x,y))

Solution (Python):


ar = []

while True:
  a = [int(i) for i in input().split()]
  if a != [0,0]:
    ar.append(a)
  else:
    break

for i in range(len(ar)):
  for j in range(len(ar[i])):
    print(sorted(ar[i])[j], end = ' ' if j != len(ar[i])-1 else '\n')

Solution (Python):
input_data = []
m=0
while 1:
	a,b = input().split()

	if int(a) == 0 and int(b) == 0:
		break
	

	elif int(a) <= int(b) :
		m+=1
		input_data.extend([a,b])
	else :
		m+=1
		input_data.extend([b,a])

n=0
			
for i in range(m):
	print(input_data[n],input_data[n+1])
	n+=2

Solution (Python):
while 1:
	a,b = input().split()

	if int(a) == 0 and int(b) == 0:
		break
	

	elif int(a) <= int(b) :
		print(a,b)
	else :
		print(b,a)

Solution (Python):
while True:
    [a, b] = sorted(map(int, input().split()))

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

Solution (Python):
while True:
    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 = sorted(map(int, input().split()))
    if a == 0 and b == 0:
        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):
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("{0} {1}".format(a,b))
        else:
                print("{1} {0}".format(a,b))

Solution (Python):
i = j = 0
x = ''
y = ''

while True:
  line = input()
  line = line.split()
  x = int(line[0])
  y = int(line[1])

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

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

  else:
    print(x,end=' ')
    print(y)

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

Solution (Python):
import sys
 
for i in sys.stdin:
    i = i.split(" ")
    x, y = int(i[0]), int(i[1])
    if x == y == 0:
       break
    elif x <= y:
       print("{0} {1}".format(x, y))
    else:
       print("{0} {1}".format(y, x))

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

Solution (Python):
for i in range(3000):
  x,y=map(int,input().split())
  if x == 0 and y == 0:
    break
  print('{0} {1}'.format(min(x,y),max(x,y)))

Solution (Python):
for _ in range(3000):
    x, y = [int(w) for w in input().split()]
    if x == 0 and y == 0:
        break
    min_ = x if x < y else y
    max_ = x if x > y else y
    print(min_, max_)

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

Solution (Python):

 
while True:
  [a, b] = [int(x) for x in input().strip().split(' ')]
  if a == 0 and b == 0:
    break
  if a > b:
    b, a = a, b
  print(a, b)

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

Solution (Python):
for _ in range(3000):
    x, y = list(map(int, input().split()))
    if (x==0) & (y==0):
        break
    else:
        if x < y:
            print("%d %d"%(x, y))
        else:
            print("%d %d"%(y, x))

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

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

Solution (Python):
while True:
    i = input()
    if i == "0 0":
        break
    else:
        i_list = i.split()
        int_list = []
        int_list.append(int(i_list[0]))
        int_list.append(int(i_list[1]))
        int_list.sort()
        print(int_list[0],int_list[1])

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

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

Solution (Python):
a = list(map(int,input().split()))
while a != [0,0]:
    print(str(min(a))+" "+str(max(a)))
    a = list(map(int,input().split()))

Solution (Python):
a = list(map(int,input().split()))
while a != [0,0]:
    print(str(min(a))+" "+str(max(a)))
    a = list(map(int,input().split()))

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

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

Solution (Python):
for i in range(1,3001):
	x,y=[int(i) for i in input().split()]
	if x==0 and y==0:
		break
	elif x>y:
		x,y=y,x
	print("{0} {1}".format(x,y))

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

Solution (Python):
import sys

for line in sys.stdin:
  xs = list(map(int, line.split()))

  if xs[0] == 0 and xs[1] == 0:
    break
    
  print(' '.join(map(str, sorted(xs))))

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

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

    if not ( x + y):
       break

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

    print(x, y)

Solution (Python):
xy_data=[]
while True:
    xy=list(map(int,input().split()))
    xy.sort()
    if xy[0]==xy[1]==0:
        break
    else:
        xy_data.append(xy)
for xy in xy_data:
    print(*xy)

Solution (Python):

n = []
while (True):
	x = list(map(int,input().split()))
	if x[0] == 0 and x[1] == 0:
		break
	n.append(x)
for i in n:
	if i[0] > i[1]:
		print(i[1], i[0])
	else:
		print(i[0], i[1])

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):
while 1:
	x = map(int,raw_input().split())
	
	if x[0]+x[1] == 0:
		break

	if x[0] > x[1]:
		tmp = x[0]
		x[0] = x[1]
		x[1] = tmp
	
	print x[0],x[1]

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
    
num = sys.stdin
    
while True :
    a, b = map(int, num.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 :
    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 :
    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 and b==0:
        break
    if a<b:print(a,b)
    else:print(b,a)

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

Solution (Python):
while True:
	x, y = sorted(map(int, 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
 if a <= b:
   print(a,b)
 else:
    print(b,a)

Solution (Python):
list1=[]
while True:
    x = input("")
    if x == "0 0":
        break
    else:
        list1.append(x)

for i,v in enumerate(list1):
    x,y = map(int,v.split())
    if x <= y:
        print(str(x) + " " + str(y))
    else:
        print(str(y) + " " + str(x))

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

Solution (Python):
while True:
    a = map(int, raw_input().split())
    if a.count(0) == 2:
        break
    else:
        print(str(min(a)) + " " + str(max(a)))

Solution (Python):
ret = []
while True:
    x = raw_input().split()
    if int(x[0]) == int(x[1]) == 0: break

    if int(x[0]) > int(x[1]):
        ret += ['%s %s' % (x[1], x[0])]
    else:
        ret += ['%s %s' % (x[0], x[1])]

for x in ret:
    print(x)

Solution (Python):
while True:
    inputted_str = input().split()
    x = int(inputted_str[0])
    y = int(inputted_str[1])

    if x == 0 and y == 0:
        break
    elif x < y:
        print("{} {}".format(x, y))
    else:
        print("{} {}".format(y, x))

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

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

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

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

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

for n in numbers:
    print(str(min(n)) + " " + str(max(n)))