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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = 1
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
    if a>b:
        print(b,a)
    else:
        print(a,b)

Submission status: Accepted

Solution code:
i = 0

while i<=3000 :
    i += 1
    x,y = map(int,input().split())
    if (x == 0) & (y == 0) :
        break
    elif x <= y:
        print(f"{x} {y}")
    else:
        print(f"{y} {x}")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_list = []

while True:
    pair_str = input().split()
    pair_int = [int(s) for s in pair_str]
    if pair_int[0] == 0 and pair_int[1] == 0 :
        break
    else:
        input_list.append(pair_int)

for pair_int in input_list:
    if pair_int[0] <= pair_int[1]:
        print("{} {}".format(pair_int[0], pair_int[1]))
    else:
        print("{} {}".format(pair_int[1], pair_int[0]))

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:
lists=[]
while True:
    a,b=map(int,input().split())
    if a==0 and b==0:
        break
    if a>b:
        lists.append(b)
        lists.append(a)
    else:
        lists.append(a)
        lists.append(b)

j=0

for i in lists:
    print("{0} {1}".format(lists[2*j],lists[2*j+1]))
    j=j+1
    if j==len(lists)//2:
        break

Submission status: Accepted

Solution code:
for i in range(1,3000+1) :
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    else :
        X=min(x,y)
        Y=max(x,y)
        print(X,Y)

Submission status: Accepted

Solution code:
la = list()
lb = list()
casenum = 0;

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

for num in la:

    if la[casenum]<lb[casenum]:
        print(la[casenum],lb[casenum])
    else:
        print(lb[casenum],la[casenum])
    casenum +=1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mylist = []
while True:
    value = input()
    if value == "0 0":
        break
    if value:
        v_list = [int(i) for i in value.split()]
        v_list.sort()
        mylist.append(v_list)
for i in mylist:
    print(i[0], i[1])

Submission status: Accepted

Solution code:
def minmax(a,b):
    return [min(a,b),max(a,b)]

x,y = map(int,input().split())
while x+y!=0:
    x,y = minmax(x,y)
    print(x,y)
    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
    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
    elif a <= b:
        print(a, b)
    elif a > b:
        print(b, a)

Submission status: Accepted

Solution code:
stopper = 1
x,y = [],[]
while stopper == 1:
	a,b = map(int,input().split())
	if a == 0 and b == 0:
		stopper = 0
	else:
		x.append(min(a,b))
		y.append(max(a,b))
for i in range(len(x)):
	print(x[i],y[i])

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

while True:
    l = list(map(int, input().split()))
    if(l[0] == 0 and l[1] == 0):
        sys.exit()
    else:
        if(l[0] > l[1]):
            print('{0} {1}'.format(l[1], l[0]))
        else:
            print('{0} {1}'.format(l[0], l[1]))

Submission status: Accepted

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

Submission status: Accepted

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

while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    else:
        z.append(x)
        z.append(y)
        z.sort()
        print(z[0],z[1])
        z.clear()

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

Submission status: Accepted

Solution code:
import sys
S = sys.stdin.buffer.readlines()
A = []
B = []
for s in S:
    A.append(s.split()[0].decode())
    B.append(s.split()[1].decode())

for a, b in zip(A, B):
    if(int(a) == 0 and int(b) == 0):
        break
    if(int(a) >= int(b)):
        print(f"{b} {a}")
    else:
        print(f"{a} {b}")

Submission status: Accepted

Solution code:
while True:
    x,y=(int(i) for i in input().split())
    if x==0 and y==0:
        break
    else:
        syo=min(x,y)
        dai=max(x,y)
        print(syo,dai)

Submission status: Accepted

Solution code:
while(True):
    val = input().split(" ")
    s = [int(n) for n in val]
    s.sort()
    if s == [0,0]:
        break
    print("{0} {1}".format(s[0],s[1]))

Submission status: Accepted

Solution code:
while True:
    val = input().split()
    s = [int(n) for n in val]
    s.sort()
    if s[0] == 0 and s[1] == 0:
        break
    print("{0} {1}".format(s[0], s[1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
d=[]
while True:    
   a=input().split(" ")
   if a[0]=='0' and a[1]=='0':
      break
   d.append(int(a[0]))
   d.append(int(a[1]))
for i in range(0,len(d),2):
    if d[i]>d[i+1]:
      print(d[i+1],d[i])
    else:
      print(d[i],d[i+1])

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:
A=[]
while True:
    x,y=map(int,input().split())
    if x==0 and y==0:
        break
    else:
        A.append([min(x,y),max(x,y)])

for a in A:
    print(a[0],a[1])

Submission status: Accepted

Solution code:
from math import sqrt
def main():
    ins=[]
    x=0
    y=0
    while True:
        x,y=map(int,input().split())
        if x==0 and y==0:
            break
        if x<y:
            ins.append(f"{x} {y}")
        else:
            ins.append(f"{y} {x}")
    for i in range(len(ins)):
        print(ins[i])
    return 0
if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def check_num(x, y):
    if x > y:
        print(f'{y} {x}')
    else:
        print(f'{x} {y}')

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
while True:
    x=0
    y=0
    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(y<x):
        print(str(y)+" "+str(x))
    else:
        print(str(x)+" "+str(y))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ai = []
while True:
    q = list(map(int,input().split()))
    if sum(q) == 0:
        break
    ai.append(q)
    
for i in range(len(ai)):
    if ai[i][0] > ai[i][1]:
        print(ai[i][1],ai[i][0])
    else:
        print(ai[i][0],ai[i][1])

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:
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)
    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
    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):
        n=x
        x=y
        y=n
    print(x,y)
    x,y=map(int,input().split())

Submission status: Accepted

Solution code:
def getSortedInput():
    s = list(map(int, input().split()))
    s.sort()
    return s

s = getSortedInput()
while s[0] != 0 or s[1] != 0:
    print(' '.join(map(str,s)))
    s = getSortedInput()

Submission status: Accepted

Solution code:
def sample():
    while True:
        a, b = input().split(" ")
        a, b = sorted([int(a), int(b)])
        if a == b == 0: break
        print(f"{a} {b}")

sample()

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

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:
    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:
pairs = []
while True:
    a, b = map(int,input().split())
    if (a, b) == (0, 0):
        break
    else:
        pairs.append([a, b])
for pair in pairs:
    pair.sort()
    print(*pair)

Submission status: Accepted

Solution code:

inp = 0
i = 0
while 1:
    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:
        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:
l=[]
while True:
  e = list(map(int,input().split()))
  if e==[0, 0]:
    break
  e.sort()
  l.append(e)

for ele in l:
  print(str(ele[0]) +" "+str(ele[1]))

Submission status: Accepted

Solution code:
i = 1
while True :
    x,y = map(int,input().split())
    if (x,y)== (0,0):
        break
    if x > y:
        x,y = y,x
    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
    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;
    else:
        print(str(x)+' '+str(y)) if x < y else print(str(y)+' '+str(x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(10000):
    a = list(map(int,input().split()))
    if a[0] == a[1] == 0:
        exit()
    if a[0] > a[1]:
        a[0],a[1] = a[1],a[0]
    print(a[0],a[1])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
	x,y=sorted([int(x) for x in input().split()])
	if (x,y)==(0,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:
        print(a,b)
    else:
        print(b,a)

Submission status: Accepted

Solution code:
#ITP1_3_C
while True:
    x, y = input().split()
    x, y = int(x), int(y)
    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:
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:
#
# 3c
#

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(1, 3001):
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    else:
        print('%d %d' % (min(x, y), max(x, y)))

Submission status: Accepted

Solution code:
nsets = []
nset = []

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

for i in range(len(nsets)):
    nums = nsets[i]
    if nums[0] > nums[1]:
        print("{} {}" .format(nums[1], nums[0]))
    else:
        print("{} {}" .format(nums[0], nums[1]))

Submission status: Accepted

Solution code:
a=[]
while True:
    a.append(list(map(int,input().split(" "))))
    if a[-1]==[0,0]:
        break
a=a[:-1]
for i in a:
    print(str(min(i))+" "+str(max(i)))

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:
for i in range(3000):
    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
    else:
        if a > b:
            print(b,a)
        else:
            print(a,b)

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("{0} {1}".format(a[0],a[1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(3000):
  x,y=(int(a) for a 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:
    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:
import sys
for l in sys.stdin:
	a, b = map(int, l.split())
	if a == 0 and b == 0:
		break
	print(min(a,b),max(a,b))

Submission status: Accepted

Solution code:
#calc practice.py

i = 1
while True:
    x,y = (int(x) for x in input().split())
    if (x == 0 and y == 0):
        exit()

    else :
            list = [0, 0]
            list[0] = x
            list[1] = y
            list.sort()
            print (list[0],list[1])
            i += 1

Submission status: Accepted

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

Submission status: Accepted

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

    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:
XS = list(map(int, open(0).read().split()))
for i in range(0, len(XS), 2):
    a = XS[i]
    b = XS[i+1]
    if a == 0 and b == 0:
        break
    if a < b:
        print("{} {}".format(a, b))
    else:
        print("{} {}".format(b, a))

Submission status: Accepted

Solution code:
while 1 :
    lst=list(map(int,input().split()))
    if lst==[0,0] : break
    lst.sort()
    print("{} {}".format(lst[0],lst[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:
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:
        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
    print(f"{x} {y}" if y > x else f"{y} {x}")

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:
    x, y=map(int, input().split())

    if x==0 and y==0:
        break
    else:
        if x>=y:
            print(f"{y} {x}")
        if x<y:
            print(f"{x} {y}")

Submission status: Accepted

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

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:
ls = []
n = 0
while 1:
    ls1 = list(map(int,input().split()))
    #print(ls1)
    if ls1[0] == 0 and ls1[1] == 0:
        break
    else:
        ls1.sort()
        ls.append(list(ls1))
        #print(ls)
        ls1.clear()
        #print(ls1)
#print(len(ls))
#print(ls)
for i in range(len(ls)):
    print(ls[i][0],ls[i][1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().split()
a,b = int(s[0]),int(s[1])
while not(a == 0 and b == 0):
    if(a<b):
        print(a,b)
    else:
        print(b,a)
    s = input().split()
    a,b = int(s[0]),int(s[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = 0
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 :
        print(a, b)
    else:
        print(b, a)

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

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(3000):
    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 = [int(x) for x in input().split()]
    if a == 0 and b == 0:
        break
    else:
        if a <= b:
            print(a,b)
        elif a > b:
            print(b,a)

Submission status: Accepted

Solution code:
while True:
    num = input().split(" ")

    x = int(num[0])
    y = int(num[1])

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

    if x > y:
        tmp = x
        x = y
        y = tmp

    print("%d %d" % (x, y))

Submission status: Accepted

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

for i in deta :
    i.sort()
    print(*i)

Submission status: Accepted

Solution code:
import sys


def resolve():
    for line in sys.stdin:
        x, y = map(int, line.split())
        if x == y == 0:
            break
        if x < y:
            print(x, y)
        else:
            print(y, x)


resolve()

Submission status: Accepted

Solution code:
for i in range(3000):
    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:
import sys
input = sys.stdin.readline

while True:
    x,y = [int(i) for i in input().strip().split()]
    if x or y:
        print(" ".join([str(i) for i in sorted([x,y])]))
    else:
        break

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

Submission status: Accepted

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

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:
flag=True
while flag:
  a,b=map(int,input().split(' '))
  if a==0 and b==0:
    flag=False
  elif a>b:
    print('{} {}'.format(b,a))
  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
    if x > y:
        x,y = y,x
    print("%d %d" % (x,y))

Submission status: Accepted

Solution code:
L = []
i = 0
while True:
  x, y = list(map(int, input().split(' ')))
  if x == 0 and y == 0:
    break
  if x < y:
    L.append([x, y])
  else:
    L.append([y, x])
for n in L:
  print(*n)

Submission status: Accepted

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

Submission status: Accepted

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

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)
0 <= x, y <= 10000

Submission status: Accepted

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

Submission status: Accepted

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