while True:

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

    if a == 0 and b == 0:

        break

    if a < b:

        print((a, b))

    else:

        print((b, a))
while True:

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

    if a == 0 and b == 0:

        break

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

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

-    a, b = list(map(int, input().split())) +    a, b = sorted(map(int, input().split())) -    if a < b: -        print((a, b)) -    else: -        print((b, a)) +    print((a, b))