x,y=input().split()

while (x!='0'or y!='0'):

    if(int(x)>int(y)):print(("{} {}".format(y,x)))

    else:print(("{} {}".format(x,y)))

    x,y=input().split()
while 1:

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

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

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

x, y = input().split()
while x != "0" or y != "0":
    if int(x) > int(y):
        print(("{} {}".format(y, x)))
    else:
        print(("{} {}".format(x, y)))
    x, y = input().split()

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

-x, y = input().split() -while x != "0" or y != "0": -    if int(x) > int(y): -        print(("{} {}".format(y, x))) -    else: -        print(("{} {}".format(x, y))) -    x, y = input().split() +while 1: +    x, y = map(int, input().split()) +    if x == 0 and y == 0: +        break +    print(*[y, x] if x > y else [x, y])