# coding: utf-8

# Here your code !



while True:

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

    

    if x == 0 and y == 0:

        break

    

    if x < y:

        print((str(x) + " " + str(y)))

    else:

        print((str(y) + " " + str(x)))
from sys import stdin



for test_case in range(3000 + 2):

    x, y = list(map(int, stdin.readline().split()))



    if not(x + y):

        break



    if x > y:

        x, y = y, x



    print((x, y))
# coding: utf-8
# Here your code !
while True:
    x, y = list(map(int, input().split()))
    if x == 0 and y == 0:
        break
    if x < y:
        print((str(x) + " " + str(y)))
    else:
        print((str(y) + " " + str(x)))

from sys import stdin

for test_case in range(3000 + 2):
    x, y = list(map(int, stdin.readline().split()))
    if not (x + y):
        break
    if x > y:
        x, y = y, x
    print((x, y))

-# coding: utf-8 -# Here your code ! -while True: -    x, y = list(map(int, input().split())) -    if x == 0 and y == 0: +from sys import stdin + +for test_case in range(3000 + 2): +    x, y = list(map(int, stdin.readline().split())) +    if not (x + y): -    if x < y: -        print((str(x) + " " + str(y))) -    else: -        print((str(y) + " " + str(x))) +    if x > y: +        x, y = y, x +    print((x, y))