list = []

while True:

  line = input().split(" ")

  if line[0] == "0" and line[1] == "0":

    break

  line = list(map(int, line))

  #print line

  if line[0] > line[1]:

    temp = line[0]

    line[0] = line[1]

    line[1] = temp

  print(" ".join(map(str, line)))
while True:

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

    if x == 0 and y == 0:

        break

    else:

        if x > y:

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

        else:

            print(str(x) + " " + str(y))
list = []
while True:
    line = input().split(" ")
    if line[0] == "0" and line[1] == "0":
        break
    line = list(map(int, line))
    # print line
    if line[0] > line[1]:
        temp = line[0]
        line[0] = line[1]
        line[1] = temp
    print(" ".join(map(str, line)))

while True:
    x, y = list(map(int, input().split()))
    if x == 0 and y == 0:
        break
    else:
        if x > y:
            print(str(y) + " " + str(x))
        else:
            print(str(x) + " " + str(y))

-list = [] -    line = input().split(" ") -    if line[0] == "0" and line[1] == "0": +    x, y = list(map(int, input().split())) +    if x == 0 and y == 0: -    line = list(map(int, line)) -    # print line -    if line[0] > line[1]: -        temp = line[0] -        line[0] = line[1] -        line[1] = temp -    print(" ".join(map(str, line))) +    else: +        if x > y: +            print(str(y) + " " + str(x)) +        else: +            print(str(x) + " " + str(y))