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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(1, 3005):
    x = input().split(" ")
    a = int(x[0])
    b = int(x[1])
    if a + b == 0:
        break
    if a < b:
        print(str(a) + " " + str(b))
    else:
        print(str(b) + " " + str(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
f = "{} {}\n".format
open(1, 'w').writelines([f(*sorted(map(int, line.split()))) for line in open(0).readlines()][:-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = 0
b = 0
inp = []

i = 0
j = 0

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

    i += 1

for j in range(i):
    if inp[j][0] <= inp[j][1]:
        print("%s %s" % (inp[j][0], inp[j][1]))
    else:
        print("%s %s" % (inp[j][1], inp[j][0]))

Submission status: Accepted

Solution code:
while True :

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

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:
x = []

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

Submission status: Accepted

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

def main():
    number_list=[]
    while True:
        x,y=map(int,input().split())
        if x==0 and y==0:
            break
        else:
            number_list.append([x,y])
    for number in number_list:
        if number[0]<number[1]:
            print("{} {}".format(number[0],number[1]))
        else:
            print("{} {}".format(number[1],number[0]))

if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    print(min(a,b),max(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:
for i in range(10001):
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    if x<y:
        print(f'{x} {y}')
    else:
        print(f'{y} {x}')

Submission status: Accepted

Solution code:
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:
    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:
#２つの整数 x, y を読み込み、それらを値が小さい順に出力するプログラム

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

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

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 a == 0 and b == 0:
    break
  if a > b:
    a, b = b, a
  print("%d %d" %(a,b))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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 ascend(a, b):
    template = '{} {}'
    if a < b:
        return template.format(a, b)
        
    return template.format(b, a)

EOL = '0 0'

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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 1 :
    a,b=map(int,input().split())
    if a==0 and b==0 :
        break
    if a>b:
        a+=b
        b=a-b
        a-=b
    print("%d %d"%(a,b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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("%s %s" %(x,y))
        else:
            print("%s %s" %(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:
        print(b, a)
    else:
        print(a, b)

Submission status: Accepted

Solution code:
import sys


def main(lines=None):
    # ここは変えない
    if not lines:
        lines = sys.stdin.readlines()
    lines = [line.split() for line in lines]
    # ここまで
    lines_int = [sorted(list(map(int, line))) for line in lines]

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

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


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

    assert answer == expect


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

    nums = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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"):
    print(" ".join(map(str, sorted(list(map(int, e.split()))))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


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


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


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


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


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

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:
x = -1
while x!=0:
    ab = list(map(int, input().split()))
    ab.sort()
    if sum(ab) == 0:
        x = 0
    else:
        ab = [str(i) for i in ab]
        L=' '.join(ab)
        print(L)

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
l = []
while True:
  x,y = map(int,input().split())
  if (x,y) == (0,0):
    break
  if x > y:
    x,y = y,x
  l.append((x,y))
for t in l:
  print(*t)

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(str(y)+' '+str(x))
  else:
    print(str(x)+' '+str(y))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
x = []
y = []

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

cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

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