while True:

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

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

		break

	if (x < y) :

		print((str(x) + " " + str(y)))

	else :

		print((str(y) + " " + str(x)))
while True:

	t = input().split()

	a = int(t[0])

	b = int(t[1])

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

			break

	if (a < b):

		print((str(a) + " " + str(b)))

	else:

		print((str(b) + " " + str(a)))
while True:
    x, y = list(map(int, input().split()))
    if x == 0 and y == 0:
        break
    if x < y:
        print((str(x) + " " + str(y)))
    else:
        print((str(y) + " " + str(x)))

while True:
    t = input().split()
    a = int(t[0])
    b = int(t[1])
    if (a == 0) and (b == 0):
        break
    if a < b:
        print((str(a) + " " + str(b)))
    else:
        print((str(b) + " " + str(a)))

-    x, y = list(map(int, input().split())) -    if x == 0 and y == 0: +    t = input().split() +    a = int(t[0]) +    b = int(t[1]) +    if (a == 0) and (b == 0): -    if x < y: -        print((str(x) + " " + str(y))) +    if a < b: +        print((str(a) + " " + str(b))) -        print((str(y) + " " + str(x))) +        print((str(b) + " " + str(a)))