while(True):

    i,j=input().split()

    

    if i != '0' or j != '0':

        if int(i) <= int(j):

            print(('{} {}'.format(i,j)))

        else:

            print(('{} {}'.format(j,i)))

    else:

        break

while(True):

    i,j=input().split()

    

    if i != '0' or j != '0':

        if int(i) <= int(j):

            print((i+' '+j))

        else:

            print((j+' '+i))

    else:

        break

while True:
    i, j = input().split()
    if i != "0" or j != "0":
        if int(i) <= int(j):
            print(("{} {}".format(i, j)))
        else:
            print(("{} {}".format(j, i)))
    else:
        break

while True:
    i, j = input().split()
    if i != "0" or j != "0":
        if int(i) <= int(j):
            print((i + " " + j))
        else:
            print((j + " " + i))
    else:
        break

-            print(("{} {}".format(i, j))) +            print((i + " " + j)) -            print(("{} {}".format(j, i))) +            print((j + " " + i))