while 1:

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

    if a+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+b==0:break

    print((a,b))
while 1:
    a, b = list(map(int, input().split()))
    if a + 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 + b == 0:
        break
    print((a, b))

-while 1: -    a, b = list(map(int, input().split())) +import sys + +for c in sys.stdin: +    a, b = sorted(map(int, c.split())) -    if a > b: -        a, b = b, a