for i in range(10000):

    a, b = list(map(int, input().split()))

    if a == 0 and b == 0:

        break

    else:

        if a < b:

            print((a, b))

        else:

            print((b, a))

        #print(min(a,b), max(a,b))

#

# 3c

#



def main():

    while True:

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

        if x == y == 0:

            break

        elif x > y:

            print(f"{y} {x}")

        else:

            print(f"{x} {y}")





if __name__ == '__main__':

    main()

for i in range(10000):
    a, b = list(map(int, input().split()))
    if a == 0 and b == 0:
        break
    else:
        if a < b:
            print((a, b))
        else:
            print((b, a))
        # print(min(a,b), max(a,b))

#
# 3c
#
def main():
    while True:
        x, y = list(map(int, input().split()))
        if x == y == 0:
            break
        elif x > y:
            print(f"{y} {x}")
        else:
            print(f"{x} {y}")


if __name__ == "__main__":
    main()

-for i in range(10000): -    a, b = list(map(int, input().split())) -    if a == 0 and b == 0: -        break -    else: -        if a < b: -            print((a, b)) +# +# 3c +# +def main(): +    while True: +        x, y = list(map(int, input().split())) +        if x == y == 0: +            break +        elif x > y: +            print(f"{y} {x}") -            print((b, a)) -        # print(min(a,b), max(a,b)) +            print(f"{x} {y}") + + +if __name__ == "__main__": +    main()