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



Sample input:
3 2
2 2
5 3
0 0


Sample output:
2 3
2 2
3 5

Submission status: Accepted

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

for i in range(len(a)):
    print(' '.join(map(str, sorted(a[i]))))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
#2020-03-18
i = 0
while True:
    a  = list(map(int,input().split()))
    if a[0] == a[1] == 0:
        break
    print(*sorted(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x<y:
        print("{0} {1}".format(x,y))
    else:
        print("{1} {0}".format(x,y))

Submission status: Accepted

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

    if x > y:
        y,x = x,y


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

Submission status: Accepted

Solution code:
ans = []

while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    line = [0] * 2
    line[0] = x
    line[1] = y
    line.sort()
    ans.append(line)

for i in ans:
    print(' '.join(map(str, i)))

Submission status: Accepted

Solution code:
while True:
    xs = list(map(int, input().split()))
    if xs[0] == 0 and xs[1] == 0:
        break
    xs = sorted(xs)
    print("{} {}".format(xs[0], xs[1]))

Submission status: Accepted

Solution code:
for i in range(3000):
    a = list(map(int, input().split(" ")))
    if a[0] == 0 and a[1] == 0:
        break
    else:
        a = sorted(a)
        print("{} {}".format(a[0], a[1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
while True:
    a,b=(int(x) for x in input().split())
    c=a
    if a==0 and b==0:
        break
    if a>b:
        a=b
        b=c
    print(a, b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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("%d %d" %(x,y))

Submission status: Accepted

Solution code:
while True:
 s = input().rstrip().split(' ')
 a = int(s[0])
 b = int(s[1])
 if a == 0 and b == 0:
  break;
 else:
  if b < a:
   print(str(b) + " " + str(a))
  else:
   print(str(a) + " " + str(b))

Submission status: Accepted

Solution code:
while True:
    ans = sorted([int(n) for n in input().split()])
    if sum(ans) == 0:
        break
    print(*ans)

Submission status: Accepted

Solution code:
while True:
    x = sorted(map(int, input().split()))
    if x[1]==0:
        break
    print(x[0],x[1])

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
dataset = []
a, b = 1, 1
while not(a == b == 0):
    a, b = map(int, input().split())
    dataset.append([a, b])
for data in dataset:
    data.sort()
    s = ' '.join(map(str, data))
    if s != '0 0':
        print(s)

Submission status: Accepted

Solution code:
c=[0]
d=1
while c[-1]!="0 0":
    a=[int(x) for x in input().split()]
    a.sort()
    b=("%d %d"%(a[0],a[1]))
    c.append(b)
while c[d]!="0 0":
    print(c[d])
    d+=1

Submission status: Accepted

Solution code:
output=[]
while True:
	x,y=map(int, input().split())
	if (x+y)!=0:
		output.append(str((x>=y)*y + (y>x)*x) + ' ' + str((x>=y)*x + (y>x)*y))
	else:
		break
print('\n'.join(output))

Submission status: Accepted

Solution code:
while True:
    xy = list(map(int, input().split()))
    if xy[0] == 0 and xy[1] == 0:
        break
    if xy[0] > xy[1]:
        print("{} {}".format(xy[1], xy[0]))
    else:
        print("{} {}".format(xy[0], xy[1]))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
while True:
    a = list(map(int, input().split()))
    if a[0] == 0 and a[1] == 0:
        break
    else:
        a.sort()
        print(a[0], a[1])

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
cnt = 0
while True:
    cnt += 1
    a,b = map(int, input().split())
    if a == 0 and b == 0:
        break
    print(str(min(a,b)) + " " + str(max(a,b)))

Submission status: Accepted

Solution code:
while True:
  a=list(map(int,input().split()))
  if a==[0,0]:
    break
  else:
    a.sort()
    print(' '.join(map(str,a)))

Submission status: Accepted

Solution code:
# 2つの数の変換

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

    if x==0 and y==0:
        break

    if x>y:
        tmp = x
        x = y
        y = tmp
    print(str(x) + " " + str(y))

Submission status: Accepted

Solution code:
i=1
while True:
 x,y=map(int, input().split()) 
 num=[x,y]
 if x==0 and y==0:
   break
 num=sorted(num)
 print("{} {}".format(num[0],num[1]))
 i+=1

Submission status: Accepted

Solution code:
i = 0
while 1:
    l = input()
    a,b = list(map(int,l.split()))
    if a == 0 and b == 0:
        break
    if a > b:
        print(b,a)
    else:
        print(a,b)

Submission status: Accepted

Solution code:
l = sorted(list(map(int, input().split())))
while l[0] != 0 or l[1] != 0:
    print(l[0], l[1])
    l = sorted(list(map(int, input().split())))

Submission status: Accepted

Solution code:
lists = []
while 1:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    tmp = [x,y]
    tmp.sort()
    lists.append(tmp)
for i in range(len(lists)):
    print(lists[i][0],lists[i][1])

Submission status: Accepted

Solution code:
while 1:
    x,y = map(int,input().split())
    if (x,y) == (0,0):
        break
    if x > y:
        x,y = y,x
    print(x,y)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
while True:
    input_value = input()
    
    numbers = list(map(int, input_value.split()))

    if numbers[0] == 0 and numbers[1] == 0:
        break

    numbers.sort()

    print(*numbers)

Submission status: Accepted

Solution code:
while True:
  a, b = input().split()
  a = int(a)
  b = int(b)

  if a == 0 and b == 0:
    break


  if a > b:
    a, b = b, a

  print(a,b)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
x = []
y = []
while True:
    a, b = map(int, input().split())
    x.append(a)
    y.append(b)
    if a == 0 and b == 0:
        break
for i in range((len(x) - 1)):
  if x[i] < y[i]:
    print("{} {}".format(x[i], y[i]))
  else:
    print("{} {}".format(y[i], x[i]))

Submission status: Accepted

Solution code:
while True:
    a,b = map(int, input().split())
    if a == b == 0:
        break
    elif a < b:
        print(f"{a} {b}")
    else:
        print(f"{b} {a}")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a = list(map(int, input().split()))
    if a[0] == 0 and a[1] == 0:
        break
    a.sort()
    print(a[0], a[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
lis = []
while True:
    xy = [int(i) for i in input().split()]
    if xy[0] == 0 and xy[1] == 0:
        break
    else:
        lis.append(xy)

for i in lis:
    if i[0] > i[1]:
        print(i[1], i[0])
    else:
        print(i[0], i[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
while True:
    a = list(map(int,input().split()))
    if set(a) == {0}:break
    else:
        print(*sorted(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
		x=list(map(int,input().split()))
		if x[0]==0 and x[1]==0:
			break
		elif x[0]<x[1]:
			print(str(x[0])+' '+str(x[1]))
		else:
			print(str(x[1])+' '+str(x[0]))

Submission status: Accepted

Solution code:
i = input()
while i !="0 0":
    l = list(map(int, i.split()))
    l.sort()
    ascend = map(str,l)
    print(" ".join(ascend))
    i = input()

Submission status: Accepted

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

  print(min(x, y), max(x, y))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
while True:
    x, y = [int(i) for i in input().split()]
    if x == 0 and y == 0:
        break
    if x > y:
        print(y,x)
    else:
        print(x,y)

Submission status: Accepted

Solution code:


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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = 0
while num < 10000 :
    s = input().split()
    if s[0] == "0" and s[1] == "0":
        break
    if int(s[0]) > int(s[1]):
        x = s[1]
        y = s[0]
    else:
        x = s[0]
        y = s[1]
    print(x, y)
    num += 1

Submission status: Accepted

Solution code:
while(True):
    sc = input().split()
    x = int(sc[0])
    y = int(sc[1])
    if (x == 0) and (y == 0):
        break;
    if x < y:
        print(x, y)
    else:
        print(y, x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(1, 10001):
    x, y = map(lambda z: int(z), input().split(" "))
    if (x, y) == (0, 0):
        break
    if y < x:
        print("{} {}".format(y, x))
    else:
        print("{} {}".format(x, y))

Submission status: Accepted

Solution code:
while True:
	xy = list(map(int, input().split()))
	if sum(xy) != 0:
		xy.sort()
		print("%d %d" % (xy[0], xy[1]))
	else:
		break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys

#tmp= int(input())
#tmp = input().split()
#W,H,x,y,r = list(map(lambda a: int(a), tmp))


for i in range(0,10000):
    tmp = input().split()
    x,y = list(map(lambda a: int(a), tmp))
    if((x==0)and(y==0)):
        sys.exit()

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

Submission status: Accepted

Solution code:
while True:
    a = sorted(map(int, input().split()))
    if a[0] == 0 and a[1] == 0:
        break
    else:
        print(a[0], a[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
  ans1, ans2 = map(int, list(input().split()))
  if ans1 == 0 and ans2 == 0:
    break
  if ans1 > ans2:
    print("{} {}".format(ans2, ans1))
  else:
    print("{} {}".format(ans1, ans2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
    val = input().split()
    val = [int(n) for n in val]
    if val[0] == 0 and val[1] == 0:
        break
    print(min(val), max(val))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    x = input().split()
    ans = str(x[0]) + " " + str(x[1])
    if int(x[0]) > int(x[1]):
        ans = str(x[1]) + " " + str(x[0])
    if x[0] == "0" and x[1] == "0":
        break
    print(ans)

Submission status: Accepted

Solution code:
x = []
y = []
for _ in range(1,10001):
    a, b = map(int,input().split())
    if a == b == 0:
        break
    x.append(a)
    y.append(b)

for x_num, y_num in zip(x,y):
    if x_num > y_num:
        x_num, y_num = y_num, x_num
    print(x_num,y_num)

Submission status: Accepted

Solution code:

while True:
    a, b = map(int, input().split())
    if a == b == 0:
        break
    elif a <= b:
        print(a, b, sep=' ')
    elif b < a:
        print(b, a, sep=' ')

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
x = []
y = []

while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    x.append(a)
    y.append(b)

for i in range(len(x)):
    if x[i] <= y[i]:
        print('{} {}'.format(x[i], y[i]))
    else:
        print('{} {}'.format(y[i], x[i]))

Submission status: Accepted

Solution code:
while True:
  n = [int(i) for i in input().split()]
  n = sorted(n)
  if n.count(0)==2:
    break
  print(*n)

Submission status: Accepted

Solution code:
for i in range(3000):
    s = input()
    t = s.split()
    l=[int(t[0]),int(t[1])]
    if l[0] == 0 and l[1] == 0:
        break
    l.sort()
    print(l[0],l[1])

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
for i in range(3005):
    input_list = [int(x) for x in input().split()]
    
    if input_list[0] == 0 and input_list[1] == 0: 
        break
    else: 
        input_list.sort()
        input_list = [str(x) for x in input_list]
        print(' '.join(input_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

while True:
         x = list(map(int,input().split()))
         if  x[0]== 0 and x[1]== 0:
                  break
         print(*sorted(x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range (3000):
    s = list(map(int,input().split()))
    s.sort()
    if s[1] == 0:
        break
    else:
        print(s[0],s[1])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
tmp = []
n = 0
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    else:
        x = min(a, b)
        y = max(a, b)
        tmp.append([x, y])
        n += 1

for i in range(n):
    print(tmp[i][0], tmp[i][1])

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
ans_list = list()
while True:
    x,y = map(int,input().split())
    xy = [x,y]
    if [x,y] == [0,0]:
        break
    ans_list.append([x,y])

for pair in ans_list:
    pair =sorted(pair)
    pair = [str(n) for n in pair]
    print(' '.join(pair))

Submission status: Accepted

Solution code:
lst = []
while True:
    x, y = map(int, input().split())
    if x == y == 0:
        break
    lst.append("{} {}".format(min(x, y), max(x, y)))
for i in lst:
    print(i)

Submission status: Accepted

Solution code:
X=[]
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    X.append([min(x,y),max(x,y)])
for j in range(len(X)):
    print(*X[j])

Submission status: Accepted

Solution code:
n = []
d = []
while True:
    n = [int(i) for i in input().split()]
    if n[0] == 0 and n[1] == 0:
        break
    else:
        n.sort()
        d.append(n)

for i in range(len(d)):
    print(" ".join(map(str, d[i])))

Submission status: Accepted

Solution code:
A = []
a,b = map(int, input().split())
while a != 0 or b != 0:
    B = [a,b]
    A.append(sorted(B))
    a, b = map(int, input().split())
for i in range(len(A)):
    print(A[i][0], A[i][1])

Submission status: Accepted

Solution code:
for i in range(10001):
    x,y=map(int,input().split())
    if(x+y==0):
        break
    elif(x>y):
        x,y=y,x
    print(x,y)

Submission status: Accepted

Solution code:
x = []
y = []
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    else:
        if a <= b:
            x.append(a)
            y.append(b)
        else:
            x.append(b)
            y.append(a)

for i in range(len(x)):
    print(x[i], y[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = []
y = []
while(True):
    a,b = map(int,input().split())
    if(a==0 and b==0):
        break
    x.append(a)
    y.append(b)
for i in range(len(x)):
    if(x[i] > y[i]):
        print(str(y[i])+" "+str(x[i]))
    else:
        print(str(x[i]) + " " + str(y[i]))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

a = []
while True:
    b = list(map(int, input().split()))
    if b[0] == 0 and b[1] == 0:
        break
    a.append(b)

for x in a:
    print(x[0], x[1]) if x[0] < x[1] else print(x[1], x[0])

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
while x != 0 or y != 0:
    print(min(x, y), max(x, y))
    x, y = map(int, input().split())

Submission status: Accepted

Solution code:
while True:
    a=list(map(int, input().split()))
    if a[0]==a[1]==0:
        break
    else:
        a.sort()
        print(*a)

Submission status: Accepted

Solution code:
while 1:
    a,b=map(int,input().split())
    if a==0 and b==0:
        break;
    else:
        print(min([a,b]),end=" ")
        print(max([a,b]))

Submission status: Accepted

Solution code:

def swap(a, b):
    if a > b:
        return b, a
    return a, b


while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    
    a, b = swap(a, b)
    print(f'{a} {b}')

Submission status: Accepted

Solution code:
flag = True
min_a = 0
max_a = 0
while flag:
    a = list(map(int,input().split()))
    if a[0] == 0 and a[1] == 0:
        break
    if a[0] < a[1]:
        min_a = a[0]
        max_a = a[1]
    else:
        min_a = a[1]
        max_a = a[0]
    print("{} {}".format(min_a,max_a))

Submission status: Accepted

Solution code:
while True:
    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}")

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
while x != 0 or y != 0:
    print(min(x,y),max(x,y))
    x,y = map(int,input().split())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
    a, b = map(int, input().split())
    if a == 0 and b==0:
        break;
    if a <= b:
        print(a, b, sep=" ")
    else:
        print(b, a, sep=" ")

Submission status: Accepted

Solution code:
answer = []
while True:
    xy = sorted(list(map(int, input().split())))
    if xy[0] == xy[1] == 0:
        break
    else:
        answer.append(xy)

[print(*answer[i]) for i in range(len(answer))]

Submission status: Accepted

Solution code:

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))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y=(int(x) for x in input().split())
while x!=0 or y!=0:
    if x<y:
        print(x,y)
    else:
        print(y,x)
    x,y=(int(x) for x in input().split())

Submission status: Accepted

Solution code:
while True:
    x,y = sorted([int(i) for i in input().split()])
    
    if x + y == 0:
        break
    print(x,y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = 0
lists_list = list()

while True:
    lists = list(map(int, input().split()))
    if lists[0] == 0 and lists[1] == 0:
        break
    lists.sort()
    lists_list.append(lists)
    count += 1

for i in range(0, count):
    print(f"{lists_list[i][0]} {lists_list[i][1]}")

Submission status: Accepted

Solution code:
for i in range(10000):
    x, y = map(int, input().split())
    if x < y:
        print(str(x) + " " + str(y))
    elif y < x:
        print(str(y) + " " + str(x))
    elif x == 0:
        break
    else:
        print(str(y) + " " + str(x))

Submission status: Accepted

Solution code:
def swapPrintMin(pair):
	if pair[0] < pair[1]:
		print(pair[0],pair[1])
	else:
		print(pair[1],pair[0])

def main():
	pairList = []
	while True:
		try:
			pairList.append(list(map(int,input().split())))

		except:
			break;

	for i in pairList:
		if i == [0,0]:
			continue
		
		swapPrintMin(i)

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
for i in range(10000):
    x,y = map(int, input().split())
    if x==0 and y==0:
        break
    elif y < x:
        x,y = y,x
    print(str(x)+" "+str(y))

Submission status: Accepted

Solution code:
while True:
    x,y=map(int,input().split())
    if (x,y)==(0,0):
        exit()
    if x>y:
        x,y=y,x
    print(x,y)

Submission status: Accepted

Solution code:
while True:
    l = input().split()
    x = int(l[0])
    y = int(l[1])
    if 0 == x == y: break

    if x > y:
        x,y = y,x
    
    print(x,y)

Submission status: Accepted

Solution code:
while(1):
    a=list(map(int,input().split()))
    a.sort()
    if(a[0]==a[1]==0):
        break;
    else:
        print(a[0],a[1])

Submission status: Accepted

Solution code:
import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

while 1:
    A = [int(i) for i in readline().split()]
    if A[0] == 0 and A[1] == 0:
        break
    else:
        A.sort()
        print(*A)

Submission status: Accepted

Solution code:
while True:
    d = list(map(int, input().split()))
    d.sort()
    if d[0] == d[1] == 0:
        break
    d[0] = str(d[0])
    d[1] = str(d[1])
    print(" ".join(d))

Submission status: Accepted

Solution code:
import sys
for s in sys.stdin:
 if"0 0\n"==s:break
 print(*sorted(map(int,s.split())))

Submission status: Accepted

Solution code:
case_number = 1
while True:
    a,b = map(int,input().split())
    if a==0 and b==0:
        break
    else:
        c = sorted([a,b])
        print(str(c[0]) + ' ' + str(c[1]))
        case_number += 1

Submission status: Accepted

Solution code:
i=0
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)

Submission status: Accepted

Solution code:
import sys
for s in sys.stdin:
 if'0 0\n'==s:break
 print(*sorted(map(int,s.split())))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for _ in range(3000):
    x,y = map(int, input().split())
    if x  == 0 and y == 0:
        break
    if x > y:
        print(y,x)
    else:
        print(x,y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = []
while True:
    x.append(sorted(list(map(int, input().split()))))
    if x[-1] == [0, 0]:
        break
for n in x:
    if n == [0, 0]:
        break
    print(' '.join(map(str, n)))

Submission status: Accepted

Solution code:
while True:
    x, y = map(int, input().split())
    
    if x == 0 and y == 0:
        break
    
    list_num = [x, y]
    list_num.sort()
    print(" ".join(map(str, list_num)))

Submission status: Accepted

Solution code:
while True:
	a = " ".join(map(str, sorted(map(int, input().split()))))
	if a == "0 0":
		break
	print(a)

Submission status: Accepted

Solution code:
#!python3

iim = lambda: map(int, input().rstrip().split())

def resolve():
    while True:
        a, b = iim()
        if a == b == 0:
            break
        elif a > b:
            a, b = b, a
        print(a, b)

if __name__ == "__main__":
    resolve()