while 1:

	n = input().split()

	a = int(n[0])

	b = int(n[1])

	if a == 0 and b == 0:

		break

	if a > b:

		bf = a

		a = b

		b = bf

	print((str(a) + " " + str(b)))
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)))
while 1:
    n = input().split()
    a = int(n[0])
    b = int(n[1])
    if a == 0 and b == 0:
        break
    if a > b:
        bf = a
        a = b
        b = bf
    print((str(a) + " " + str(b)))

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

-while 1: -    n = input().split() -    a = int(n[0]) -    b = int(n[1]) -    if a == 0 and b == 0: +while True: +    s = input().rstrip().split(" ") +    x = int(s[0]) +    y = int(s[1]) +    if x == 0 and y == 0: -    if a > b: -        bf = a -        a = b -        b = bf -    print((str(a) + " " + str(b))) +    if x > y: +        x, y = y, x +    print((str(x) + " " + str(y)))