for i in range(3000):

    x = list(input().split(" "))

    idx = 0

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

        break

    for j in x:

        x[idx] = int(j)

        idx += 1

    x.sort()

    print((x[0], x[1]))
for i in range(3000):

    x = list(input().split(" "))

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

        break

    idx = 0

    for j in x:

        x[idx] = int(j)

        idx += 1

    x.sort()

    print((x[0], x[1]))
for i in range(3000):
    x = list(input().split(" "))
    idx = 0
    if x[0] == "0" and x[1] == "0":
        break
    for j in x:
        x[idx] = int(j)
        idx += 1
    x.sort()
    print((x[0], x[1]))

for i in range(3000):
    x = list(input().split(" "))
    if x[0] == "0" and x[1] == "0":
        break
    idx = 0
    for j in x:
        x[idx] = int(j)
        idx += 1
    x.sort()
    print((x[0], x[1]))

-    idx = 0 +    idx = 0