while 1:

    x,y=map(int,input().split())

    if not x+y:break

    print(*[y,x] if x>y else [x,y])

while 1:

    x,y=list(map(int,input().split()))

    if not x+y:break

    if x>y:x,y=y,x

    print((x,y))
while 1:
    x, y = map(int, input().split())
    if not x + y:
        break
    print(*[y, x] if x > y else [x, y])

while 1:
    x, y = list(map(int, input().split()))
    if not x + y:
        break
    if x > y:
        x, y = y, x
    print((x, y))

-    x, y = map(int, input().split()) +    x, y = list(map(int, input().split())) -    print(*[y, x] if x > y else [x, y]) +    if x > y: +        x, y = y, x +    print((x, y))