import sys

for line in sys.stdin:

    a,b = line.split()

    a,b = int(a),int(b)

    if a == 0 and b == 0: break

    if b<a: a,b = b,a

    print('%d %d' %(a, b))
while True:

    a, b = sorted(map(int, input().split()))

    if (a, b) == (0, 0): break

    print(a, b)
import sys

for line in sys.stdin:
    a, b = line.split()
    a, b = int(a), int(b)
    if a == 0 and b == 0:
        break
    if b < a:
        a, b = b, a
    print("%d %d" % (a, b))

while True:
    a, b = sorted(map(int, input().split()))
    if (a, b) == (0, 0):
        break
    print(a, b)

-import sys - -for line in sys.stdin: -    a, b = line.split() -    a, b = int(a), int(b) -    if a == 0 and b == 0: +while True: +    a, b = sorted(map(int, input().split())) +    if (a, b) == (0, 0): -    if b < a: -        a, b = b, a -    print("%d %d" % (a, b)) +    print(a, b)