Problem:
Swapping Two Numbers Write a program which reads two integers x and y , and prints them in ascending order. Input The input consists of multiple datasets. Each dataset consists of two integers x and y separated by a single space. The input ends with two 0 (when both x and y are zero). Your program should not process for these terminal symbols. Output For each dataset, print x and y in ascending order in a line. Put a single space between x and y . Constraints  0 ≤ x , y ≤ 10000  the number of datasets ≤ 3000  Sample Input 3 2
2 2
5 3
0 0 Sample Output 2 3
2 2
3 5

Solution (Python):
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    elif x > y:
        print(y, x)
    else:
        print(x, y)

Solution (Python):
while True:
    a,b=map(int,input().split())
    if a == 0 and b == 0:
        break
    elif a>=b:
        print(b,a)
    else:
        print(a,b)

Solution (Python):
while True:
    x,y=map(int, input().split())
    if x==0 and y==0:
        break
    if x>y:
        print(y, x)
    else:
        print(x, y)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    else:
        if x<y:
            print(x,y)
        elif x>=y:
            temp=x
            x=y
            y=temp
            print(x,y)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    else:
        if x<y:
            print(x,y)
        elif x>=y:
            temp=x
            x=y
            y=temp
            print(x,y)

Solution (Python):
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0:
        break
    if a > b:
        print(b, a)
    else:
        print(a, b)

Solution (Python):
while True:
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    if(b<a):
        a,b=b,a
    print(a,b)

Solution (Python):
while True:
  x,y=sorted(map(int,input().split()))
  if x==y==0:break
  else:print(x,y)

Solution (Python):
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    elif x < y:
        print(x, y)
    else:
        print(y, x)

Solution (Python):
while True:
    x, y =map(int, input().split())
    if x == 0 and y == 0: break
    if x > y:
        print(y , x)
    else:
        print(x , y)

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x==0 and y==0 : break
    if x < y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
while True:
    a, b = map(int, input().split())
    
    if a==0 and b==0:
        break
    
    if a>b:
        tmp = a
        a = b
        b = tmp
    
    print(a, b)

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x==0 and y==0 :
        break
    if x>y:
        a=x
        x=y
        y=a
    print(x,y)

Solution (Python):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    else:
        print(f"{min(a, b)} {max(a, b)}")

Solution (Python):
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0: break
    if x < y:
        print(x, y)
    else:
        print(y, x)

Solution (Python):
while True:
    a, b = map(int, input().split())
    if a == b == 0:
        break
    if a < b:
        print(str(a) + " " + str(b))
    else:
        print(str(b) + " " + str(a))

Solution (Python):
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x < y:
        print(x, y)
    else:
        print(y, x)

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0: break 
    if x > y:
       print(y,x)
    else:
       print(x,y)

Solution (Python):
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:break
    if a > b:
        print(b,a)
    else:
        print(a,b)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==y==0:
        break
    elif x<y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):


while True:
    x=0
    x,y = map(int, input().split())
    if x == 0 and y == 0: break
    if x > y:
        print(y,x)
    elif x<y:
        print(x,y)
    elif x==y: 
        print(x,y)

Solution (Python):
i=1
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    elif (x<y):
        print(x,y)
    elif (y<x):
        print(y,x)
    elif (x==y):
        print(x,y)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x>y:
        print(y,x)
    else:
        print(x,y)

Solution (Python):
while True:
    a,b=map(int,input().split())
    if a == 0 and  b == 0:
        break
    else:
        c=[a,b]
        c=sorted(c)
        print(*c)

Solution (Python):
while True:
    a, b = map(int, input().split())
    if a == b == 0:
        break
    if a < b:
        print(str(a) + " " + str(b))
    else:
        print(str(b) + " " + str(a))

Solution (Python):
while True:
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    print(min(a,b),max(a,b))

Solution (Python):
while True:
    x,y = map(int, input().split())
    if x == 0 and y ==0:
        break
    if x < y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
for i in range(10001):
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x<y:
        print(f'{x} {y}')
    else:
        print(f'{y} {x}')

Solution (Python):
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)

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0: break
    if x > y:
        print(y, x)
    else:
        print(x, y)

Solution (Python):


while True:
    list = input().split()
    x = int(list[0]); y = int(list[1])

    if x == 0 and y == 0:
        break
    if x > y:
        prv = x; x = y; y = prv
    
    print(x, y)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    elif x<y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
while True:
  a, b = map(int, input().split())
  if a == 0 and b == 0:
    break
  if a > b:
    a, b = b, a
  print("%d %d" %(a,b))

Solution (Python):
try:
  for i in range(3000):
    x, y = list(map(int, input().split()))
    if x >= y and x != 0:
      print(y, x)
    elif x < y:
      print(x, y)
    else:
      break
except EOFError:
  pass

Solution (Python):
for i in range(10000):
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    elif (a>b):
        print(b,a)
    else:
        print(a,b)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x>y:
        print(y,x)
    else:
        print(x,y)

Solution (Python):
while True:
    x,y = map(int, input().split())
    if x == 0 and y == 0: break
    else:
        if x > y:
            print(y, x)
        else:
            print(x, y)

Solution (Python):
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0: break
    if a > b:
        print(b,a)
    else:
        print(a,b)

Solution (Python):
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        x, y = y, x
    print(x, y)

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x==0 and y==0:
        break
    elif x<y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    else:
        if x > y:
            print(y, x)
        else:
            print(x, y)

Solution (Python):
for _ in range(3010):
  x, y = [int(_) for _ in input().split()]
  if x == 0 and y == 0: break
  if x > y: x, y = y, x
  print(x, y)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x>y:
        print(y,x)
    else:
        print(x,y)

Solution (Python):
while True: 
    a,b = map(int,input().split())
    if a>b:
        a,b=b,a
        print(a,b)
    elif a==0 and b==0:
        break
    else:     
      print(a,b)

Solution (Python):
while True:
    x, y = map(int,input().split())
    if x == 0 and y == 0:break
    if x < y:
        print(x, y)
    else:
        print(y, x)

Solution (Python):
def ascend(a, b):
    template = '{} {}'
    if a < b:
        return template.format(a, b)
        
    return template.format(b, a)

EOL = '0 0'

for line in iter(input, EOL):
  x, y = map(int, line.split())
  
  print(ascend(x, y))

Solution (Python):
while True:
    x, y = [int(n) for n in input().split()]
    if x==0 and y==0:
        break
    print(*sorted([x,y]))

Solution (Python):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    if a <= b or a == b:
        print(a, b)
    else:
        print(b, a)
    if a == 0 and b == 0:
        break

Solution (Python):
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    if a > b:
        print(b,a)
    else:
        print(a,b)

Solution (Python):
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0: break
    if a > b:
        print(b, a)
    else:
        print(a, b)

Solution (Python):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    if a > b:
        a, b = b, a
    print(f"{a} {b}")

Solution (Python):
while True:
    x,y = map(int,input().split())
    
    if x == 0 and y == 0:
        break
    elif x <= y:
        print(f"{x} {y}")
    elif x > y:
        print(f"{y} {x}")

Solution (Python):
while True:
	a, b = map(int, input().split())
	if a == 0 and b == 0:
		break
	if a < b:
		print(a, b)
	else:
		print(b, a)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        print(y,x)
    else:
        print(x,y)

Solution (Python):
i=1
while True:
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    else:
        if a>b:
            a,b=b,a
            print(f'{a} {b}')
        else:
            print(f'{a} {b}')
        i +=1

Solution (Python):

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

Solution (Python):

while True:
    x, y = map(int, input().split())
    if x == y == 0:
        break
    else:
        x, y = sorted([x, y])
        print(x, y, sep=' ')

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    elif x < y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0: break

    if a > b:
        print(b, a)
    else:
        print(a, b)

Solution (Python):
while True:
    x,y = map(int, input().split())
    if x == 0 and y == 0: break
    if x > y:
        print(y, x)
    else:
        print(x, y)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x>y:
        y,x=x,y
    print(x,y)

Solution (Python):
for i in range(3000):
    x, y = map(int, input().split())
    if x == y == 0:
        break
    if x < y or x == y:
        print("{} {}".format(x, y))
    elif y < x:
        print("{} {}".format(y, x))

Solution (Python):
i=1
while True:
    a,b = input().split()
    a=int(a)
    b=int(b)
    if a == 0 and b == 0: break
    A=min(a,b)
    B=max(a,b)
    print(A,B)
    i+=1

Solution (Python):
while True:
	n=input().split()
	n[0]=int(n[0])
	n[1]=int(n[1])
	if n[0]==0 and n[1]==0:
		break

	if n[0]>n[1]:
		c=n[0]
		n[0]=n[1]
		n[1]=c
	print(n[0],n[1])

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x>y:
        print(y,x)
    elif x==y or x<y:
        print(x,y)

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    elif x >= y:
        print("%d %d" % (y,x))
    else:
        print("%d %d" % (x,y))

Solution (Python):
while True:
    x, y = sorted(map(int, input().split()))
    if(x==0 and y==0):
        break
    print(x, y)

Solution (Python):
while 1 :
    a,b=map(int,input().split())
    if a==0 and b==0 :
        break
    if a>b:
        a+=b
        b=a-b
        a-=b
    print("%d %d"%(a,b))

Solution (Python):
while True:
    a,b = map(int,input().split())
    if a == 0 and b==0:
        break
    if b<a:
        print(str(b)+" "+str(a))
    else:
        print(str(a)+" "+str(b))

Solution (Python):
import sys
X = []
while True:
    X.append(sorted(map(int, sys.stdin.readline().split())))
    if(X[-1] == [0, 0]):
        break
    print(*X[-1])

Solution (Python):
for i in range(3000):
  x,y=map(int,input().split())
  if y<x:
    print(y,x)
  elif x==0 and y==0:
    break
  else:
    print(x,y)

Solution (Python):
l = []
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        x, y = y, x
    l.append((x,y))

for x,y in l:
    print("{} {}".format(x,y))

Solution (Python):

for i in range(3000):
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x<y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
while True:
	a, b = map(int, input().split())
	if a == 0 and b == 0:
		exit()
	if a > b:
		a, b = b, a
	print(a,b)

Solution (Python):


while True:
    x,y = map(int,input().split())
    if x ==0 and y==0:
        break
    else:
        if x<y:
            print("%s %s" %(x,y))
        else:
            print("%s %s" %(y,x))

Solution (Python):
while True:
	n=input().split()
	n[0]=int(n[0])
	n[1]=int(n[1])
	if n[0]==0 and n[1]==0:
		break

	if n[0]>n[1]:
		c=n[0]
		n[0]=n[1]
		n[1]=c
	print(n[0],n[1])

Solution (Python):
while True:
    a,b=map(int, input().split())
    if a==0 and b==0:
        break
    if a>b:
        print(b, a)
    else:
        print(a, b)

Solution (Python):
import sys


def main(lines=None):
    
    if not lines:
        lines = sys.stdin.readlines()
    lines = [line.split() for line in lines]
    
    lines_int = [sorted(list(map(int, line))) for line in lines]

    answers = []
    for line in lines_int:
        if line[0] != 0 or line[1] != 0:
            answers.append("{0} {1}".format(line[0], line[1]))

    print("\n".join(answers))
    return "\n".join(answers)


def test_main():
    test_inputs = """
0 1
1 0
10 10
5758 6838
7515 113
5627 1051
7419 3010
4086 6212
2767 2749
2060 9084
7543 2225
1183 5089
5566 5137
4978 6966
""".strip()
    test_inputs = test_inputs.split("\n")
    answer = main(test_inputs)
    expect = """
0 1
0 1
10 10
5758 6838
113 7515
1051 5627
3010 7419
4086 6212
2749 2767
2060 9084
2225 7543
1183 5089
5137 5566
4978 6966
""".strip()

    assert answer == expect


if __name__ == "__main__":
    main()

Solution (Python):
nums = input()
while(nums != '0 0'):
    d = nums.split(' ')
    n1 = int(d[0])
    n2 = int(d[1])

    if(n1 > n2):
        print('{0} {1}'.format(n2, n1))
    else:
        print('{0} {1}'.format(n1, n2))

    nums = input()

Solution (Python):
while True:
    a,b=map(int,input().split())
    if a == 0 and b == 0:
        break
    if a > b:
        print(b,a)
    else:
        print(a,b)

Solution (Python):
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0: break
         
    if a > b:
        print(b, a)
    else:
        print(a, b)

Solution (Python):
while True:
    a, b = map(int, input().split())
    if a == b == 0:
        break
    if a < b:
        print(str(a) + " " + str(b))
    else:
        print(str(b) + " " + str(a))

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

Solution (Python):
while True :
    o = input().split(" ")
    x = int(o[0])
    y = int(o[1])
    if x == 0 and y == 0:
        break
    else :
        if x > y:
            print(y,x)
        else :
            print(x,y)

Solution (Python):
num = '0 0'
for e in iter(input, num):
    x, y = map(int, e.split())
    if x <= y :
        print(x, y)
    else:
        print(y, x)

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        print(y,x)
    else:
        print(x,y)

Solution (Python):
for e in iter(input, "0 0"):
    print(" ".join(map(str, sorted(list(map(int, e.split()))))))

Solution (Python):
while True:
    x, y =map(int,input().split())
    if (x == 0) and (y == 0):
        break
    num = max(x, y)
    num1 = min(x, y)
    print(num1, num)

Solution (Python):
while True:
    x, y = map(int,input().split())
    if (x == 0) and (y == 0):
        break
    num = max(x, y)
    num1 = min(x, y)
    print(num1, num)

Solution (Python):
EOL = '0 0'
for e in iter(input,EOL):
    x,y=map(int, e.split())
    if x<=y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
EOL = '0 0'
for e in iter(input, EOL):
    x, y = map(int, e.split())
    print(' '.join(list(map(str, sorted([x, y])))))

Solution (Python):
EOL = '0 0'
for e in iter(input, EOL):
    x, y = map(int, e.split())
    if x <= y :
        print(x, y)
    else:
        print(y, x)

Solution (Python):
EOL = '0 0'
for e in iter(input,EOL):
    x, y = map(int,e.split())
    if x < y :
        print(x, y)
    else:
        print(y, x)

Solution (Python):
EOL = '0 0'
for e in iter(input, EOL):
    x,y = map(int,e.split())
    if x <= y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
EOL = '0 0'
for e in iter(input, EOL):
    x, y = map(int, e.split())
    if x <= y :
        print(x, y)
    else:
        print(y, x)

Solution (Python):
EOL = '0 0'
for e in iter(input,EOL):
    x, y = map(int, e.split())
    if x < y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
EOL = '0 0'
for e in iter(input,EOL):
    x, y = map(int,e.split())
    if x <= y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
import sys


def I(): return int(sys.stdin.readline().rstrip())


def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))


def S(): return sys.stdin.readline().rstrip()


def LS(): return list(sys.stdin.readline().rstrip().split())


while 1:
    x = LI()
    if x[0] == 0 and x[1] == 0:
        break
    x.sort()
    print(x[0], x[1])

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x>y:
        t=x
        x=y
        y=t
    print(x,y)

Solution (Python):
while True:
    x,y = map(int, input().split())
    if x == 0 and y ==0:
        break
    if x < y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
x = -1
while x!=0:
    ab = list(map(int, input().split()))
    ab.sort()
    if sum(ab) == 0:
        x = 0
    else:
        ab = [str(i) for i in ab]
        L=' '.join(ab)
        print(L)

Solution (Python):
i = 0
while i < 3000:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    print(min(x,y), max(x,y))
    i+=1

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    else:
        if x>y:
            print(y,x)
        else:
            print(x,y)

Solution (Python):
while True:
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    if a<b:
        print(a,b)
    elif a==b:
        print(a,b)
    elif a>b:
        print(b,a)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    elif x>y:
        print(f'{y} {x}')
    else:
        print(f'{x} {y}')

Solution (Python):
while True:
    a,b=map(int,input().split())
    
    if  a==0 and b==0:
        break
    elif a>b:
        print(b,a)
    else:
        print(a,b)

Solution (Python):
l = []
while True:
  x,y = map(int,input().split())
  if (x,y) == (0,0):
    break
  if x > y:
    x,y = y,x
  l.append((x,y))
for t in l:
  print(*t)

Solution (Python):
while True:
	a, b = map(int, input().split())
	if a == 0 and b == 0:
		break
	if a < b:
		print(a, b)
	else:
		print(b, a)

Solution (Python):
i=0
while True:
  x, y = map(int, input().split()) 

  if x==0 and y==0:
    break
      
  if x>y:
    print(str(y)+' '+str(x))
  else:
    print(str(x)+' '+str(y))

Solution (Python):
x,y=map(int,input().split())
while x!=0 or y!=0:
    if x>y:
        x,y=y,x
    print(x,y)
    x,y=map(int,input().split())
else:
    pass

Solution (Python):
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    if a < b:
        print(a,b)
    else:
        print(b,a)

Solution (Python):
while True:
    x,y=list(map(int,input().split()))
    if x==0 and y==0 :
        break
    print(min(x,y),max(x,y))

Solution (Python):
nums = []
while True:
    x = sorted(map(int, input().split()))
    if x[0] == 0 and x[1] == 0:
        break
    else:
        nums.append(' '.join(map(str, x)))
for i in range(len(nums)):
  print(nums[i])

Solution (Python):
import sys
x = []
y = []

for l in sys.stdin:
    xl, yl = map(int, l.split())
    if xl == 0 and yl == 0:
        break
    else:
        x.append(xl)
        y.append(yl)

cnt = 0

for le in x:
    if x[cnt] <= y[cnt]:
        print(x[cnt], y[cnt])
    else:
        print(y[cnt], x[cnt])
    cnt += 1

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        x,y = y,x
    print("%d %d" %(x,y))

Solution (Python):
while True:
    x, y = (int(x) for x in input().split())
    if x == y == 0:
        break
    else:
        if x < y:
            print("{} {}".format(x, y))
        else:
            print("{} {}".format(y, x))

Solution (Python):
while True:
    a = list(map(int,input().split()))
    if sum(a) == 0:
        break
    print(min(a),max(a))

Solution (Python):
while True:
    a, b = map(int, input().split(" "))
    
    if (a == 0) & (b == 0):
        break
    else:
        min_num = min(a, b)
        max_num = max(a, b)
        print(min_num, max_num)

Solution (Python):
ls = []
while True:
    x,y = map(int,input().split())
    if x == y == 0:
        break
    if x > y :
        tmp = y
        y = x
        x = tmp
    ls.append([x,y])

for i in range(len(ls)):
    print("{} {}".format(ls[i][0],ls[i][1]))

Solution (Python):
for e in iter(input, '0 0'):
    x, y = map(int, e.split())
    if x > y:
        print(y, x)
    else:
        print(x, y)

Solution (Python):

while 1:
    x,y = map(int,input().split())
    
    if x==0 and y==0:
        break
    elif x > y:
        x,y=y,x
        print("%d %d"%(x,y))
    else:
        print("%d %d"%(x,y))

Solution (Python):
while True:
    a,b=map(int, input().split())
    if a == 0 and b == 0 : break
    if b >= a :
        print(a,b)
    else :
        print(b,a)

Solution (Python):
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0: break
    if a > b:
        tmp = b
        b = a
        a = tmp
        print('{} {}'.format(a,b))
    else:
        print('{} {}'.format(a,b))

Solution (Python):
while True:
    x,y = map(int,input().split(" "))
    if x == 0 and y == 0:
        break
    else:
        if x<= y:
            print(x,y)
        else:
            print(y,x)

Solution (Python):
import sys

def main():
  while True:
      a,b = map(int, input().split())
      if a == 0 and b == 0: break

      print(f"{min(a, b)} {max(a, b)}")
    

if __name__=='__main__':
    main()

Solution (Python):
while True:
     x,y=map(int,input().split())
     if x>y:
          b = x
          x = y
          y = b
     if (x == 0)and(y == 0):
          break
     print(x,y)

Solution (Python):
while True:
    x,y=map(int, input().split())
    if x == 0 and y == 0:
        break
    if x<y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
for i in range(3000):
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    if x < y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
while True:
    x, y = map(int,input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        print(y, x)
    else:
        print(x, y)

Solution (Python):
while True:
    x, y= map(int, input().split())
    if x==0 and y==0:
        break
    if x <= y:
       _min=x
       _max=y
    else:
       _min=y
       _max=x
    print( str(_min)+(" ")+str(_max))

Solution (Python):
i = 0
while True:
  x, y = map(int, input().split())
  if x ==0 and y ==0:
    break
  else:
    c = sorted([x, y])
    print(c[0], c[1])
    i += 1

Solution (Python):
import sys

input = sys.stdin.readline

def main():
    while True:
        
        a,b = map(int, input().split())
         
        if a == 0 and b == 0:
            sys.exit()
        elif a > b:
            print(str(b) + " " + str(a))
        else:
            print(str(a) + " " + str(b))
        

if __name__ == "__main__":
    main()

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x > y:
        x,y = y,x
  
    else:
        x,y =x,y
   
    
    if x == y == 0:
        break
    print(x,y)

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

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    elif x<y :
        print(x,y)
    else:print(y,x)

Solution (Python):
i=1
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x<=y:
        print(x,y)
    else:
        print(y,x)
    i+=1

Solution (Python):
while True:
    x,y=map(int,input().split())
    if 0<=x<=10000 and 0<=y<=10000:
        if x==0 and y==0:
            break
        elif x>y:
            print(y,x)
        else:
            print(x,y)

Solution (Python):
a = []
tmp_1 = 1
tmp_2 = 1
while(True):
  tmp_1,tmp_2  = map(int,input().split())
  if tmp_1 == 0 and tmp_2 == 0:
    break
  else:
    x  = [tmp_1,tmp_2]
    x.sort()
    a.append(x)
    
for i in range(len(a)):
  print(f'{a[i][0]} {a[i][1]}')

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x==0 and y==0:
        break
    else:
        if x>y:
            print(y, x)
        else:
            print(x, y)

Solution (Python):
while True:
    nums = list(map(int,input().split()))
    if nums[0]+nums[1] == 0:
        break
    nums.sort()
    print(f"{nums[0]} {nums[1]}")

Solution (Python):
a,b=1,1
while a!=0 or b!=0 :
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    elif a>b:
        a,b=b,a
    print(a, b)

Solution (Python):
while 1:
    l = list(map(int, input().split()))
    l.sort()
    if l[0] == l[1] == 0:
        break
    print(l[0], l[1])

Solution (Python):
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0: break
    if a > b:
        print(b, a)
    else:
        print(a, b)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x<=y:
        print(x,y)
    elif x>y:
        print(y,x)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x == 0 and y == 0:break
    
    if x>y:
        print(y,x)
    else:
        print(x,y)

Solution (Python):
while True :
 a, b = map(int, input().split())
 if a == 0 and b == 0 :
  break
 if a > b :
  a, b = b, a
 print(a, b)

Solution (Python):
for x, y in ((int(i) for i in j.split()) for j in iter(input, "0 0")):
  print(y, x) if x > y else print(x, y)

Solution (Python):
while True:
    x,y=list(map(int,input().split()))
    if x==0 and y==0 :
        break
    print(min(x,y),max(x,y))

Solution (Python):
while True:
    x,y = map(int,input().split())
    if (x == 0) and (y == 0):
        break
    if x > y:
        print(y,x)
    else:
        print(x,y)

Solution (Python):
while True:
    x,y = map(int, input().split())
    if x==0 and y==0:
        break
    elif x>y:
        print(y, x)
    else:
        print(x, y)

Solution (Python):
ls=[]

while True:
    s1,s2=tuple(input().split())
    
    x1=int(s1)
    x2=int(s2)
    
    if x1 == 0 and x2==0:
        break
    
    if x1<x2:
        ls.append((x1,x2))
    else:
        ls.append((x2,x1))
    

for i,j in ls:
    print(f"{i} {j}")

Solution (Python):
while True:
    x, y = map(int, input().split())
    if x == y == 0:
        break

    if x < y:
        print(x, y)
    else:
        print(y, x)

Solution (Python):
while True:
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    if a>b:
        a,b=b,a
    print(a,b)

Solution (Python):
for i in range(20000):
    a = list(map(int,input().split()))
    if a == [0,0]:
        break
    else:
        a.sort()
        print(*a)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x == 0 and y == 0:break
    if x < y:
        print(x, y)
    
    else:
        print(y, x)

Solution (Python):
n = 1
while True:
    x,y=map(int,input().split())
    if x == y  == 0:
        break
    if x > y:
        x,y = y,x
    print(f'{x} {y}')

Solution (Python):
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    elif a > b:
        print(b, a)
    else:
        print(a, b)

Solution (Python):
while True:
	a, b = map(int, input().split())
	if a == 0 and b == 0:
		break
	if a < b:
		print(a, b)
	else:
		print(b, a)

Solution (Python):
i = 1
while True:
    x,y = map(int, input().split())
    if (x==0)&(y==0): break
    print(*sorted([x,y]))

Solution (Python):
while True:
    a,b = map(int,input().split())
    if a == 0 and b ==0:
        break
    elif a > b:
        print(b,a)
    else:
        print(a,b)

Solution (Python):
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x>y:
        print(y,x)
    else :
        print(x,y)

Solution (Python):
alist=[]

while True:
	i=[int(x) for x in input().split()]
	if i[0] == 0 and i[1] == 0:
		break
	else:
		alist.append(i)

for j in range(len(alist)):
	alist[j].sort()
	print(alist[j][0],alist[j][1])

Solution (Python):
while True:
    x, y = sorted(map(int, input().split()))

    if x == 0 and y == 0:
        break
    print(x, y)

Solution (Python):
while True:
    a,b=map(int, input().split())
    if a==0 and b==0:
        break
    if a>b:
        print(b,a)
    else:
        print(a,b)

Solution (Python):
while True:
  x, y = map(int, input().split())
  if x == 0 and y == 0:
    break
  if x < y:
    print(x, y)
  else:
    print(y, x)

Solution (Python):
i=0
while i<3000:
    x,y=map(int,input().split())
    i+=1
    if x==0 and y==0:
        break
    if x<y:
        print(x,y)
    else:
        print(y,x)

Solution (Python):
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:break
    if x > y:
        print(y, x)
    else:
        print(x, y)

Solution (Python):
while True:
    a,b = map(int,input().split())
    if a==0 and b==0:
        break
    elif a>b:
        print(b,a)
    else:
        print(a,b)

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    elif x >= y:
        print(y,x)
    elif x < y:
        print(x,y)

Solution (Python):
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0 :
        break
    if x > y :
        print(y, x)
    else:
        print(x, y)

Solution (Python):
for e in iter(input, "0 0"):
    L = list(map(int, e.split()))
    L.sort()
    print(*L)

Solution (Python):
while True :
    x, y = map(int, input().split())
    if x == 0 and y == 0: break
    if x > y:
        print(y, x)
    else:
        print(x, y)