import sys

while True :

    ab = list(map(int,sys.stdin.readline().split()))

    a = ab[0]

    b = ab[1]

    if a == 0 and b == 0 :

        break

    elif a > b :

        print((b,a))

    else :

        print((a,b))
import sys

while True :

    ab = list(map(int,sys.stdin.readline().split()))

    a = ab[0]

    b = ab[1]

    if a == 0 and b == 0 :

        break

    else :

        ab = sorted(ab)

        print((ab[0],ab[1]))
import sys

while True:
    ab = list(map(int, sys.stdin.readline().split()))
    a = ab[0]
    b = ab[1]
    if a == 0 and b == 0:
        break
    elif a > b:
        print((b, a))
    else:
        print((a, b))

import sys

while True:
    ab = list(map(int, sys.stdin.readline().split()))
    a = ab[0]
    b = ab[1]
    if a == 0 and b == 0:
        break
    else:
        ab = sorted(ab)
        print((ab[0], ab[1]))

-    elif a > b: -        print((b, a)) -        print((a, b)) +        ab = sorted(ab) +        print((ab[0], ab[1]))