import sys



while True:

	xy=sys.stdin.readline()

	nums=xy.split( ' ' )

	for i in range( len( nums) ):

		nums[i] = int( nums[i] )

	if nums[0] == 0 and nums[1] == 0:

		break

	else:

		if nums[1] < nums[0]:

			t=nums[0]

			nums[0]=nums[1]

			nums[1]=t

		print(( "{} {}".format( nums[0], nums[1] ) ))
import sys



while True:

	nums = [ int( val ) for val in sys.stdin.readline().split( " " ) ]

	if 0 == nums[0] and 0 == nums[1]:

		break

	else:

		nums.sort()

		print(( "{} {}".format( nums[0], nums[1] ) ))
import sys

while True:
    xy = sys.stdin.readline()
    nums = xy.split(" ")
    for i in range(len(nums)):
        nums[i] = int(nums[i])
    if nums[0] == 0 and nums[1] == 0:
        break
    else:
        if nums[1] < nums[0]:
            t = nums[0]
            nums[0] = nums[1]
            nums[1] = t
        print(("{} {}".format(nums[0], nums[1])))

import sys

while True:
    nums = [int(val) for val in sys.stdin.readline().split(" ")]
    if 0 == nums[0] and 0 == nums[1]:
        break
    else:
        nums.sort()
        print(("{} {}".format(nums[0], nums[1])))

-    xy = sys.stdin.readline() -    nums = xy.split(" ") -    for i in range(len(nums)): -        nums[i] = int(nums[i]) -    if nums[0] == 0 and nums[1] == 0: +    nums = [int(val) for val in sys.stdin.readline().split(" ")] +    if 0 == nums[0] and 0 == nums[1]: -        if nums[1] < nums[0]: -            t = nums[0] -            nums[0] = nums[1] -            nums[1] = t +        nums.sort()