if __name__ == '__main__':

    while True:

        key_in = eval(input())

        #data = key_in.split(' ')

        data = [int(x) for x in key_in.split(' ')]

        data.sort()



        if data[0] == 0 and data[1] == 0:

            break

        else:

            print(('{0} {1}'.format(data[0], data[1])))
# -*- coding: utf-8 -*-

"""

http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_3_C&lang=jp



"""

import sys

from sys import stdin

input = stdin.readline





def main(args):

    while True:

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

        if x == 0 and y == 0:

            break

        if x > y:

            x, y = y, x

        print((x, y))





if __name__ == '__main__':

    main(sys.argv[1:])

    
if __name__ == "__main__":
    while True:
        key_in = eval(input())
        # data = key_in.split(' ')
        data = [int(x) for x in key_in.split(" ")]
        data.sort()
        if data[0] == 0 and data[1] == 0:
            break
        else:
            print(("{0} {1}".format(data[0], data[1])))

# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_3_C&lang=jp
"""
import sys
from sys import stdin

input = stdin.readline


def main(args):
    while True:
        x, y = list(map(int, input().split()))
        if x == 0 and y == 0:
            break
        if x > y:
            x, y = y, x
        print((x, y))


if __name__ == "__main__":
    main(sys.argv[1:])

+# -*- coding: utf-8 -*- +""" +http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_3_C&lang=jp +""" +import sys +from sys import stdin + +input = stdin.readline + + +def main(args): +    while True: +        x, y = list(map(int, input().split())) +        if x == 0 and y == 0: +            break +        if x > y: +            x, y = y, x +        print((x, y)) + + -    while True: -        key_in = eval(input()) -        # data = key_in.split(' ') -        data = [int(x) for x in key_in.split(" ")] -        data.sort() -        if data[0] == 0 and data[1] == 0: -            break -        else: -            print(("{0} {1}".format(data[0], data[1]))) +    main(sys.argv[1:])