import sys

       

while True:

    (x, y) = [int(i) for i in sys.stdin.readline().split()]

       

    if x == 0 and y == 0:

        break

       

    if x > y:

        z = x

        x = y

        y = z

       

    print((x, y))
import sys

   

ff = sys.stdin

   

while True :

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

    if (a == 0) & (b == 0) :

        break

   

    if a < b : print((a, b))

    else : print((b, a))
import sys

while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split()]
    if x == 0 and y == 0:
        break
    if x > y:
        z = x
        x = y
        y = z
    print((x, y))

import sys

ff = sys.stdin
while True:
    a, b = list(map(int, ff.readline().split()))
    if (a == 0) & (b == 0):
        break
    if a < b:
        print((a, b))
    else:
        print((b, a))

+ff = sys.stdin -    (x, y) = [int(i) for i in sys.stdin.readline().split()] -    if x == 0 and y == 0: +    a, b = list(map(int, ff.readline().split())) +    if (a == 0) & (b == 0): -    if x > y: -        z = x -        x = y -        y = z -    print((x, y)) +    if a < b: +        print((a, b)) +    else: +        print((b, a))