while True:

	ia=[int(i) for i in input().split(" ")]

	if ia[0]==ia[1]==0:

		break

	print((" ".join([str(i) for i in sorted(ia)])))
# encoding:utf-8

while True:

	input = list(map(int, input().split()))

	x, y = input

	if x == y == 0:

		break

	input.sort()

	print((" ".join(map(str, input)))) 
while True:
    ia = [int(i) for i in input().split(" ")]
    if ia[0] == ia[1] == 0:
        break
    print((" ".join([str(i) for i in sorted(ia)])))

# encoding:utf-8
while True:
    input = list(map(int, input().split()))
    x, y = input
    if x == y == 0:
        break
    input.sort()
    print((" ".join(map(str, input))))

+# encoding:utf-8 -    ia = [int(i) for i in input().split(" ")] -    if ia[0] == ia[1] == 0: +    input = list(map(int, input().split())) +    x, y = input +    if x == y == 0: -    print((" ".join([str(i) for i in sorted(ia)]))) +    input.sort() +    print((" ".join(map(str, input))))