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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for e in iter(input, '0 0'):
    x, y = map(int, e.split())
    if 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
    elif x > y:
        x,y=y,x
        print("%d %d"%(x,y))
    else:
        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
    if b >= a :
        print(a,b)
    else :
        print(b,a)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
for i in range(20000):
    a = list(map(int,input().split()))
    if a == [0,0]:
        break
    else:
        a.sort()
        print(*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:
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}')

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:
i = 1
while True:
    x,y = map(int, input().split())
    if (x==0)&(y==0): break
    print(*sorted([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=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:
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])

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

Submission status: Accepted

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

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==0 and b==0:
        break
    elif 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:
        print(y,x)
    elif x < y:
        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 e in iter(input, "0 0"):
    L = list(map(int, e.split()))
    L.sort()
    print(*L)

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

Submission status: Accepted

Solution code:
for i in range(3000):
    x,y=map(int,input().split())
    
    if x>y:
        print(y,end=' ')
        print(x)
        
    elif y>x:
        print(x,end=' ')
        print(y)
        
        
    elif x==0 and y==0:
        break
    
    else:
        print(x,end=' ')
        print(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:
for i in range(1,10001):
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    else:
        x=[a,b]
        x=sorted(x)
        print(x[0],x[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
    elif x>y:
        print(y,x)
    else:
        print(x,y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(3000):
    x = list(map(int,input().split()))
    
    if x[0] == 0 and x[1] == 0:
        break
    x.sort()
    print(x[0],x[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:
        x, y = y, x
    print(f'{x} {y}')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(10000):
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        exit()
    print(min(x,y),max(x,y))

Submission status: Accepted

Solution code:
i = 0
data = []
buff =[]

while True:
    buff = list(map(int, input().split()))
    
    if buff == [0, 0]:
        break
    data.append(buff)
    data[i].sort()
    i += 1

for j in data:
    print("{} {}".format(j[0], j[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(a,b)
    else :
        print(b,a)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(len(list_x)):
   list_x[i],list_y[i]=sorted([list_x[i],list_y[i]])
   print(list_x[i],list_y[i])

Submission status: Accepted

Solution code:
t = 2
i = 0
while t != 0:
  i += 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:
x,y = map(int,input().split())

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

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

Submission status: Accepted

Solution code:
while True:
    x,y=(int(x) for x in input().split())
    if x==0 and y==0:
        break
    elif x<=y:
        print(x,y)
    elif x>=y:
        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(x, y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(0, 3001):
    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:
def resolve():
    res = []
    while True:
        x,y  = map(int,input().split())
        if x == y == 0:break
        res.append(sorted([x,y]))
    for i in range(len(res)):
        print(*res[i])

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data=[]

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

    if x[0] > x[1]:
        temp = x[0]
        x[0] = x[1]
        x[1] = temp

    data.append(x)

for i in data:
    print(*i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = []

for i in iter(input, '0 0'):
    j, k = (int(l) for l in i.split())
    if k < j:
        a.append([k, j])
    else:
        a.append([j, k])

for i in a:
    print(*i)

Submission status: Accepted

Solution code:




for i in range(1000000):
    val = input()
    array = list(map(int,val.split()))
    array.sort()
    if sum(array) == 0:
        break
    print('{} {}'.format(array[0],array[1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

i = int()

for i in range(10000):
    D = list(map(int,input().split()))
    if D[0]==0 and D[1]==0:
        break
    D.sort()
    
    print(D[0],D[1])

Submission status: Accepted

Solution code:
i = 0
while True:
    x, y = map(int, input().split())
    if x>0 or y>0 :
        list = [x, y]
        if list[0]>list[1]:
            list[0], list[1] = list[1], list[0]
        print(list[0],list[1])
        i = i + 1
    
    if x==0 and y==0:
        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:
i = 0
while i < 3000:
    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

Submission status: Accepted

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

    x, y = sorted([x, y])
    print(x, y)

Submission status: Accepted

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

    print(x,y)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
n=1
i=[]
try:
    while n<=3000:
        a,b=map(int,input().split())
        if a==0 and b==0:
            break
        else:
            if a<b:
                i.append(str(a)+" "+str(b))
            else:
                i.append(str(b)+" "+str(a))
        n+=1
except EOFError:
    pass
i_n="\n".join(i)
print(i_n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = 0
for i in range(3000):
    input_x, input_y =(int(x) for x in input().split())
    
    if input_x == 0 and input_y == 0:
        break
    if input_x < input_y:
        print(input_x, input_y)
    else:
        print(input_y,input_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:
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=raw_input().split()
    if(int(x)==0 and int(y)==0):
        break
    elif(int(x)>int(y)):
        print(str(y)+' '+str(x))
    else:
        print(str(x)+' '+str(y))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(len(list)):
    if list[i][0] >= list[i][1]:
        print(list[i][1],list[i][0])
    else:
        print(list[i][0],list[i][1])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
for e in list(open(0))[:-1]:print(*sorted(map(int,e.split())))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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:
i = 0
while True:
    a,b = map(int, input().split())
    if (a == 0) and (b == 0):
        break
    elif a < b:
        print(str(a)+' '+str(b))
        i = i + 1
    else:
        print(str(b)+' '+str(a))
        i = 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:
def test_case():
    for i in range(1, 3001):
        li = list(map(int, input().split()))
        if li[0] == 0 and li[1] == 0:
            break

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


if __name__ == "__main__":
    test_case()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!


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 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:
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:
i=1
while i<=3000:
    a,b=map(int, input().split())
    if a==0 and b==0:
        break
    else:
        if a>b:
            a,b=b,a
        print(a,b)
    i+=1

Submission status: Accepted

Solution code:
while True:
    x, y = (int(x) for x in input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        swp = x
        x = y
        y = swp
    print(x,end=' ')
    print(y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def sort_ab(int_a, int_b):
    if int_a >= int_b:
        print('{} {}'.format(int_b, int_a))
    else:
        print('{} {}'.format(int_a, int_b))

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

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("{} {}".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:
        t=x
        x=y
        y=t
    
    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(b, a)
    else:
        print(a, b)