while True:

    x,y=sorted([int(x) for x in input().split()])

    if x==0 and y==0: break

    print((x,y))

while True:

 a,b=sorted([int(x) for x in input().split()])

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

 print((a,b))

while True:
    x, y = sorted([int(x) for x in input().split()])
    if x == 0 and y == 0:
        break
    print((x, y))

while True:
    a, b = sorted([int(x) for x in input().split()])
    if a == 0 and b == 0:
        break
    print((a, b))

-    x, y = sorted([int(x) for x in input().split()]) -    if x == 0 and y == 0: +    a, b = sorted([int(x) for x in input().split()]) +    if a == 0 and b == 0: -    print((x, y)) +    print((a, b))