while True:

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



    if x == y == 0:

        break



    if x <= y:

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

    else:

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



while True:

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



    if x == y == 0:

        break



    if x <= y:

        print((x, y))

    else:

        print((y, x))



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

while True:
    x, y = list(map(int, input().split()))
    if x == y == 0:
        break
    if x <= y:
        print((x, y))
    else:
        print((y, x))

-        print(("{} {}".format(x, y))) +        print((x, y)) -        print(("{} {}".format(y, x))) +        print((y, x))