while True:

    tmp=sorted(map(int,input().split()))

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

        break

    print((tmp[0], tmp[1]))

while True:

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

    if x == 0 and y == 0:

        break

    if x > y:

        x, y = y, x

    print(('{} {}'.format(x, y)))

while True:
    tmp = sorted(map(int, input().split()))
    if tmp[0] == 0 and tmp[1] == 0:
        break
    print((tmp[0], tmp[1]))

while True:
    x, y = list(map(int, input().split()))
    if x == 0 and y == 0:
        break
    if x > y:
        x, y = y, x
    print(("{} {}".format(x, y)))

-    tmp = sorted(map(int, input().split())) -    if tmp[0] == 0 and tmp[1] == 0: +    x, y = list(map(int, input().split())) +    if x == 0 and y == 0: -    print((tmp[0], tmp[1])) +    if x > y: +        x, y = y, x +    print(("{} {}".format(x, y)))