import sys

 

ff = sys.stdin

 

while True :

    a, b = list(map(int, ff.readline().split()))

    if (a == 0) & (b == 0) :

        break

 

    if a < b : print((a, b))

    else : print((b, a))

 

exit()
import sys

 

ff = sys.stdin

 

while True :

    a, b = list(map(int, ff.readline().split()))

    if (a == 0) & (b == 0) :

        break

 

    if a < b : print((a, b))

    else : print((b, a))
import sys

ff = sys.stdin
while True:
    a, b = list(map(int, ff.readline().split()))
    if (a == 0) & (b == 0):
        break
    if a < b:
        print((a, b))
    else:
        print((b, a))
exit()

import sys

ff = sys.stdin
while True:
    a, b = list(map(int, ff.readline().split()))
    if (a == 0) & (b == 0):
        break
    if a < b:
        print((a, b))
    else:
        print((b, a))

-exit()