a=[]

while 1:

 n=eval(input())

 if n=='0 0':break

 a.append(n)

for s in a:

 print((*sorted(map(int, s.split()))))
a=[]

import sys

for s in sys.stdin:

 if s=='0 0\n':break

 a.append(s)

for t in a:

 x,y=map(int,t.split())

 print(f'{y} {x}') if x>y else print(t.strip())

a = []
while 1:
    n = eval(input())
    if n == "0 0":
        break
    a.append(n)
for s in a:
    print((*sorted(map(int, s.split()))))

a = []
import sys

for s in sys.stdin:
    if s == "0 0\n":
        break
    a.append(s)
for t in a:
    x, y = map(int, t.split())
    print(f"{y} {x}") if x > y else print(t.strip())

-while 1: -    n = eval(input()) -    if n == "0 0": +import sys + +for s in sys.stdin: +    if s == "0 0\n": -    a.append(n) -for s in a: -    print((*sorted(map(int, s.split())))) +    a.append(s) +for t in a: +    x, y = map(int, t.split()) +    print(f"{y} {x}") if x > y else print(t.strip())