import sys

while 1:

    (a,b)=[int(c)for c in sys.stdin.readline().split(' ')]

    if a==0 and b==0:break

    if a>b:a,b=b,a

    print((a,b))
import sys

for c in sys.stdin:

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

    if a==0 and b==0:break

    print((a,b))
import sys

while 1:
    (a, b) = [int(c) for c in sys.stdin.readline().split(" ")]
    if a == 0 and b == 0:
        break
    if a > b:
        a, b = b, a
    print((a, b))

import sys

for c in sys.stdin:
    a, b = sorted(map(int, c.split()))
    if a == 0 and b == 0:
        break
    print((a, b))

-while 1: -    (a, b) = [int(c) for c in sys.stdin.readline().split(" ")] +for c in sys.stdin: +    a, b = sorted(map(int, c.split())) -    if a > b: -        a, b = b, a