import sys

while True :

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

    if a == 0 and b == 0 :

        break

    elif a > b :

        print((b,a))

    else :

        print((a,b))
import sys

while True :

    a,b = sys.stdin.readline().split()

    a = int(a)

    b = int(b)

    if a == 0 and b == 0 :

        break

    elif a > b :

        print((b,a))

    else :

        print((a,b))
import sys

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

import sys

while True:
    a, b = sys.stdin.readline().split()
    a = int(a)
    b = int(b)
    if a == 0 and b == 0:
        break
    elif a > b:
        print((b, a))
    else:
        print((a, b))

-    a, b = list(map(int, sys.stdin.readline().split())) +    a, b = sys.stdin.readline().split() +    a = int(a) +    b = int(b)