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:
while True:
        listA = list(map(int,input().split()))
        if listA == [0,0]:
            break
        else:
            print("{} {}".format(min(listA), max(listA)))

Submission status: Accepted

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

while not((x == 0) and (y == 0)):
    print(' '.join(map(str, sorted([y, x]))))
    x, y = map(int, input().split())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
    n1, n2 = map(int, input().split())
    if n1 == 0 and n2 == 0:
        break
    if n1 > n2:
        print('%d %d' % (n2, n1))
    else:
        print('%d %d' % (n1, n2))

Submission status: Accepted

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

A = []
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    else:
        if a > b:
            a,b = b,a
        else:
            pass
        A.append((a,b))


for i in range(len(A)):
    a,b = A[i]
    print(a,b)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
import sys
nums = list(map(lambda x: int(x), sys.stdin.readline().split()))
while not (nums[0] == 0 and nums[1] == 0):
  if nums[0] >  nums[1]:
    print(nums[1], nums[0])
  else:
    print(nums[0], nums[1])
  nums = list(map(lambda x: int(x), sys.stdin.readline().split()))

Submission status: Accepted

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

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:
    As = list(map(int, input().split()))
    if As == [0,0]:
        break
    print(*sorted(As))

Submission status: Accepted

Solution code:
while True:
    a, b = list(map(int, input().split()))
    
    if a == 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,b)==(0,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
    elif a < b:
        print(a, b)
    else:
        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(x, y)
    else:
            print(y, x)

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:
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:
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:
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:
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:
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:
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:
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:
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:
while True:
    x,y=map(int,input().split())
    if x == 0 and y == 0:
        break
    if  y > x:
     print(str(x)+' '+str(y))
    elif x > y:
     print(str(y)+' '+str(x))
    
    else:
      print(str(x)+' '+str(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(str(y)+" "+str(x))
  else:
    print(str(x)+" "+str(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:
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:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    elif a >= b:
        print(str(b) + " " + str(a))
    else:
        print(str(a) + " " + str(b))

Submission status: Accepted

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

for i in range(len(list1)):
    print(list1[i][0],list1[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:
for i in range(9999999):
    a = list(map(int, input().split()))

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

    if a[0] > a[1]:
        i = a[0]
        a[0] = a[1]
        a[1] = i
    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(a,b)
    else:
        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(x, y)
    else:
        print(y, x)

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(f"{x} {y}")

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:
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    elif x > y:
        print("{0} {1}".format(y,x))
    else:
        print("{0} {1}".format(x,y))

Submission status: Accepted

Solution code:
for i in range(3001):
    x,y = sorted(map(int,input().split()))
    if (x,y)==(0,0):
        break
    print("{} {}".format(x,y))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
xys =[]
while True:
    a,b =input().split()
    if a=='0' and b=='0':
        break
    xys.append([int(a),int(b)])
       
for xy in xys:
    x,y = sorted(xy)
    print(x,y)

Submission status: Accepted

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

    if x == 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 == 0 and b == 0:
        break
    else:
        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
    if x < y:
        print(x, y)
    else:
        print(y, x)

Submission status: Accepted

Solution code:
def filter(a,b):
    if a<=b:
        print(str(a)+" "+str(b))
    else:
        print((str(b)+" "+str(a)))


flg=0
i=1
in_data=input()
in_list=in_data.split(" ")
in_list[0]=int(in_list[0])
in_list[1]=int(in_list[1])

while flg==0:
    if in_list[0]==0 and in_list[1]==0:
        flg=1
    else:
        filter(in_list[0],in_list[1])
        in_data=input()
        in_list=in_data.split(" ")
        in_list[0]=int(in_list[0])
        in_list[1]=int(in_list[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(str(y) + " " + str(x))
    else:
        print(str(x) + " " + str(y))

Submission status: Accepted

Solution code:
a,b=sorted(map(int,input().split()))
while a!=0 or b!=0:
    print(a,b)
    a,b=sorted(map(int,input().split()))

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    while True:
        a, b = map(lambda x: int(x), input().split())

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

        if (a < b):
            print(f"{a} {b}")
        else:
            print(f"{b} {a}")

Submission status: Accepted

Solution code:
x = 99999
y = 99999
while not(x == 0 and y == 0):
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    else:
        if x > y:
            print(str(y) + " " + str(x))
        elif x <= y:
            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(f"{a} {b}")
  else:
    print(f"{b} {a}")

Submission status: Accepted

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

    if x == 0 and y == 0:
        break
    print(f'{min(x, y)} {max(x, y)}')

Submission status: Accepted

Solution code:
i = 0
while True:
    i += 1
    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:
while True:
    l=list(map(int,input().split()))
    if l[0]>l[1]:
        print(l[1],l[0])
    elif l[0]==0 and l[1]==0:
        break
    else:
        print(l[0],l[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
	if a<b:        
		print(str(a)+' '+str(b))
	else:
	    print(str(b)+' '+str(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
for i in range(3000):
    x, y = map(int,input().split())
    if x != 0 or y != 0:
        if x > y:
            print(y,x)
        else:
            print(x,y)
    else:
        break

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,b = map(int,input().split())
    if a+b == 0:
        break
    
    if a<b:
        print("{} {}".format(a,b))
    else:
        print("{} {}".format(b,a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:

    data=list(map(int,input().split()))
    if data[0]==0 and data[1]==0:
        break
    
    data.sort()
    print(f"{data[0]} {data[1]}")

Submission status: Accepted

Solution code:
li = []
while True:
  l = input()
  a, b = list(map(int,l.split()))
  if a ==0 and b == 0:
    break
  else:
    if a > b :
      a,b = b,a
  li.append(f'{a} {b}') 

for j in li:
  print(j)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = True

while i:
    a,b= map(int, input().split())
    
    if a==0 and b==0:
        break
        
    elif a >= b:
        
        print(b,a)
        
    elif a <= b:
        
        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(x,y)
    elif x > y:
        print(y,x)

Submission status: Accepted

Solution code:
while True:
    a,b = map(int,input().split())
    if ([a,b]==[0,0]):
        exit()
    if (a<b):
        print("{} {}".format(a,b))
    else:
        print("{} {}".format(b,a))

Submission status: Accepted

Solution code:
[x, y] = list(map(int, input().split(" ")))

while True:
    if x is 0 and y is 0:
        break
    if x < y:
        print(x,y)
    else:
        print(y,x)
    [x, y] = list(map(int, input().split(" ")))

Submission status: Accepted

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

    if x == 0 and y == 0:
        break
    
    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:
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:
    x,y = map(int,input().split(" "))
    if x == 0 and y==0:
        break
    elif y < x:
        print(y,x)
    else:
        print(x,y)

Submission status: Accepted

Solution code:
A = []
while True:
	a = [int(i) for i in input().split()]
	if a == [0,0]:
		break
	A.append(a)
	
for i in range(len(A)):
	if A[i][0] > A[i][1]:
		s = A[i][0]
		A[i][0] = A[i][1]
		A[i][1] = s
		
	print(A[i][0],A[i][1])

Submission status: Accepted

Solution code:
while True:
    c = input().split()
    x, y = int(c[0]), int(c[1])
    if x == y == 0:
        break
    if y < x:
        x, y = y, x
    print("%d %d" % (x, y))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    [a,b] = [int(n) for n in input().split(' ')]
    if a == 0 and b == 0:
        break
    elif a > b:
        print(str(b)+" "+str(a))
    else:
        print(str(a)+" "+str(b))

Submission status: Accepted

Solution code:
L=list()
K=list()
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        for i in range(len(L)):
            print(L[i],end=" ")
            print(K[i])
        break
    else:
        if x<y:
            L.append(x)
            K.append(y)
        else:
            L.append(y)
            K.append(x)

Submission status: Accepted

Solution code:
while True:
  [x, y] = [int(n) for n in input().split(' ')]
  if x == 0 and y == 0:
    break
  elif x <= y:
    print("{} {}".format(x, y))
  elif y < x:
    print("{} {}".format(y, x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
bul = True

while bul:

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

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

    elif (x > y):
        print (y,x)

    else:
        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 :
        print (y,x)
    else:
        print (x, y)

Submission status: Accepted

Solution code:
for i in range(3001):
    a,b = map(int, input().split())
    if b<a:
        c = a
        a = b
        b = c
    if a==0 and b==0:
        break
    print(a,b)

Submission status: Accepted

Solution code:
p=0
ans=[]
while p==0:
    x,y=map(int,input().split())
    if x==0 and y==0:
        p=1
    else:
        ans.append([min(x,y),max(x,y)])

for i,j in ans:
    print(i,j)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    l = list(map(int, input().split()))
    if l == [0, 0]: break
    print(str(min(l)) + " " + str(max(l)))

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:

while True:
    a = list(map(int, input().split()))
    a.sort()
    if(a[0] == 0 and a[1] ==0):
        break
    print("%d %s" % (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(b,a)
    else:
        print(a,b)

Submission status: Accepted

Solution code:
while True:
    L=input().split( )
    x=int(L[0])
    y=int(L[1])
    if x==0 and y==0:break
    if x>y:
        print(f"{y} {x}")
    else:
        print(f"{x} {y}")

Submission status: Accepted

Solution code:
#from numpy import*
#from scipy import*
from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby
from operator import mul
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
from math import factorial
from copy import deepcopy
import sys
#input=sys.stdin.readline  #危険！基本オフにしろ！
sys.setrecursionlimit(10**6)


def main():
    *a,=map(int,open(0).read().split())
    a.pop()
    a.pop()
    for j in [sorted(a[i:i+2])for i in range(0,len(a),2)]:
        print(*j)
if __name__ == '__main__':
    main()

Submission status: Accepted

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

    if x == y == 0:
        break

    if   x <= y:
        print(f"{x} {y}")
    elif x > y:
        print(f"{y} {x}")
    else:
        raise ValueError(x, y)

Submission status: Accepted

Solution code:
num=1
while True:
	x,y=map(int,input().split())
	if x==0 and y==0:break
	list=[x,y]
	print(' '.join(map(str,sorted(list))))
	num += 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)
    else:
        print(y, x)

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:
for i in range(0, 10000):
    num = input().split(" ")
    
    x = int(num[0])
    y = int(num[1])
    if x == 0 and y == 0:
        break
    if x > y:
        print("{1} {0}".format(x, y))
    else:
        print("{0} {1}".format(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(f'{a} {b}')
    else :
        print(f'{b} {a}')

Submission status: Accepted

Solution code:
while 1:
    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 = input().split()
    x, y = int(a[0]), int(a[1])

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

    elif x > y:
        print("%d %d" % (y, x))
    
    else:
        print("%d %d" % (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("{} {}".format(y, x))
    else:
        print("{} {}".format(x, y))

Submission status: Accepted

Solution code:
while True:
    a = input().split()
    x,y = int(a[0]),int(a[1])
    if x == 0 and y ==0:
        break
    elif x <= y:
        print("%d %d" %(x, y))
    else:
        print("%d %d" %(y, x))

Submission status: Accepted

Solution code:
count_val = 1
list1 = []
while True:
    input_x, input_y = list(map(int, input().split()))
    if input_x == input_y == 0:
        break
    else:
        list1.append(input_x)
        list1.append(input_y)
        joined_list1 = " ".join(map(str, sorted(list1)))
        print(joined_list1)
        del list1[:]
exit()

Submission status: Accepted

Solution code:
# coding: utf-8

while True:
    x,y=(int(a) for a in input().split())
    if x==0 and y==0:
        break;
    elif x>y :
        print("{} {}".format(y,x))
    else :
        print("{} {}".format(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:
    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(a,b)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
i=1
while True :
    x,y=map(int,input().split());
    if  (x,y) == (0,0) :
        break
    else :
        if x < y :
            print(x,y)
        else :
            print(y,x)

Submission status: Accepted

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

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:
    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
  elif x > y:
      x,y = y,x
      print(x,y)
  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:
    print(y,x)
  else:
    print(x,y)

Submission status: Accepted

Solution code:
for i in range(100000):
    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:
i = 1
while True:
  a,b = map(int, input().split())
   
  if a>b:
    x = a
    a = b
    b = x
     
  if a == 0 and b ==0:
    break
   
  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:
       x,y = y,x
   print("%d %d" %(x,y))

Submission status: Accepted

Solution code:
i = 1
while True:
  a,b = map(int, input().split())
  
  if a>b:
    x = a
    a = b
    b = x
    
  if a == 0 and b ==0:
    break
  
  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:
    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:
    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:
    x,y=y,x  
  print(x,y)

Submission status: Accepted

Solution code:
while True:
  x, y = map(int, input().split())
  if x > y:
    x,y = y,x
  if x ==0 and y == 0:
    break
  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:
   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:
    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(f"{x} {y}")
    else:
        print(f"{y} {x}")

Submission status: Accepted

Solution code:
while True:
    nums = list(map(int, input().split()))
    
    if nums[0] == nums[1] == 0:
        break;
    if nums[0] > nums[1]:
        temp = nums[0]
        nums[0] = nums[1]
        nums[1] = temp
        
    print(nums[0], nums[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
  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:
a,b=map(int,input().split())
while a!=0 or b!=0:
    if a>=b:
        print(str(b)+' '+str(a))
    else:
        print(str(a)+' '+str(b))
    a,b=map(int,input().split())

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(a,b)

Submission status: Accepted

Solution code:
for _ in range(3000):
    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
      
    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
    if a<=b: print(a,b)
    if a>b: 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(x,y)
  else:
    print(y,x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
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)

Submission status: Accepted

Solution code:
while 1:
    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:
    l = list(map(int, input().split()))
    l.sort()
    x = l[0]
    y = l[1]
    if(x == 0 and y == 0):
        break
    print(str(x)+" "+str(y))

Submission status: Accepted

Solution code:
x=input().split()
a,b=int(x[0]),int(x[1])
while True:
    if a==0 and b==0:
        break
    elif a>b:
        print("%d %d"%(b,a))
    elif a<=b:
        print("%d %d"%(a,b))
    x=input().split()
    a,b=int(x[0]),int(x[1])

Submission status: Accepted

Solution code:
def main():
    while True:
        # 引数を受け取る
        args = input().split(' ')
        if int(args[0]) == 0 and int(args[1]) == 0:
            break
        else:
            if int(args[0]) > int(args[1]):
                print('{} {}'.format(args[1], args[0]))
            else:
                print('{} {}'.format(args[0], args[1]))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L=list(map(int,input().split()))
L.sort()
t = 0
while not ( L[0] == 0 and L[1] == 0 ):
	# print("Case {}: {} {}".format(t+1, str(L[0]), str(L[1]) ) )
	print("{} {}".format( str(L[0]), str(L[1]) ) )
	t+=1
	L=list(map(int,input().split()))
	L.sort()

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:
l=input().split()
x,y=int(l[0]),int(l[1])
while x != 0 or y != 0:
	if x>y:
		x,y=y,x
	print(x,y)
	l=input().split()
	x,y=int(l[0]),int(l[1])

Submission status: Accepted

Solution code:
if __name__ == '__main__':
	d = [int(s) for s in input().split()]
	while d[0] + d[1] != 0:
		d.sort()
		print(str(d[0])+" "+str(d[1]))
		d = [int(s) for s in input().split()]

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    xs = sorted(map(int,input().split()))
    if sum(xs) == 0: break
    print(*xs)