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 > y:
        w = x
        x = y
        y = w
    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 == y == 0):
        break
    elif (x <= y):
        print(str(x) + " " + str(y))
    else:
        print(str(y) + " " + str(x))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

while True:
    x,y = map(int, stdin.readline().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("%d %d" %(y, x))
  else :
    print("%d %d" %(x, y))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

while True:
    num = [int(x) for x in input().rstrip().split()]
    if num[0] ==0 and num[1] == 0:
        break
    num.sort()
    ans = " ".join(str(x) for x in num)
    print(ans)



# <?php

# while ($line = trim(fgets(STDIN))) {
#     $num = explode(" ",$line);
#     if ($num[0] == 0 && $num[1] == 0) {
#         exit();
#     }
#     sort($num);
#     $line = implode(" ",$num);
#     echo $line . PHP_EOL;
# }

# ?>

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = []
while True:
    item = list(map(int, input().split()))
    if item == [0, 0]:
        break
    item = sorted(item)
    l.append(item)

for item in l:
    print(item[0], item[1])

Submission status: Accepted

Solution code:
for i in range(10000):
    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:
i=1
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)
    else:
        print(x, y)
    i= i+1

Submission status: Accepted

Solution code:
def main():
    while True:
        a, b = (int(e) for e in input().split())
        if a == 0 and b == 0:
            break
        elif a < b:
            print(a, b)
        else:
            print(b, a)

main()

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 (f'{a} {b}')

Submission status: Accepted

Solution code:
l = []
while True:
    try:
        a = list(map(int, input().split()))
        l.append(a)   
    except EOFError:
        break
    
for i in range(len(l)-1):
    x, y = l[i]
    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(f"{y} {x}")
    else:
        print(f"{x} {y}")

Submission status: Accepted

Solution code:
while True:
    nums = list(map(int, 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(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
    print(min(a,b),max(a,b))

Submission status: Accepted

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

    if x == 0 and y == 0:
        break
    print(str(list[0]) + ' ' + str(list[1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
Inlist=[]

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

for IN in Inlist:
    IN.sort()
    print('{} {}'.format(IN[0], IN[1]))

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:
for i in range(1,3001):
    x,y=input().split()
    x=int(x)
    y=int(y)
    if x==0 and y==0:
        break
    else:
        if x<=y:
            print(x,y)
        else:
            print(y,x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    print(*sorted(Lists))

Submission status: Accepted

Solution code:
x, y = -1, -1

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

Submission status: Accepted

Solution code:
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:
	a,b=map(int,input().split())
	if a==0 and b==0:
		exit(0)
	x1 =a
	x2 =b
	if a>b:
		x1 = b
		x2 = a
	print('{0} {1}'.format(x1,x2))

Submission status: Accepted

Solution code:
while True:
    x, y=map(int,input().split())
    if x==0 and y==0:
        break
    if x>y:
        print('{0} {1}'.format(y,x))
    elif x<y:
        print('{0} {1}'.format(x,y))
    else:
        print('{0} {1}'.format(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)
        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:
result = []
while True:
    x = list(map(int,input().split()))
    if x[0] == 0 and x[1] == 0:
        break
    else:
        x.sort()
        result.append((str(x[0])+ ' '+str(x[1])))

for i in result:
    print(i)

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:
    l = input()
    a,b = list(map(int,l.split()))
    if a*a + b*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
    else:
        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
    else :
        if x < y :
            print(x, y)
        else :
            print(y, x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    z = input().split()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = []

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

for i in range(0, len(l)):
  x, y = l[i][1], l[i][0]
  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:
while True:
    nl = list(map(int, input().split()))
    if nl[0] == 0 and nl[1] == 0:
        break
    nl.sort()
    print(nl[0], nl[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(f"{x} {y}")
    else: print(f"{y} {x}")

Submission status: Accepted

Solution code:
while True:
  a = map(int,raw_input().split())
  a.sort()
  if a == [0, 0]: break

  for x in a:
    print x,
  print

Submission status: Accepted

Solution code:
while True:
    a,b = input().split(" ")
    i = int(a) + int(b)
    if i == 0:
        break
    elif int(a) <= int(b):
        print(a + " " + b)
    elif int(a) > int(b):
        print(b + " " + a)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    li = input().split()
    li[0] = int(li[0])
    li[1] = int(li[1])
    
    if li[0] == li[1] and int(li[0]) == 0:
        break
    else:
        li.sort()
        print(int(li[0]),int(li[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:
while 1:
    *L, = map(int, input().split())
    if L[0]==0 and L[1]==0:
        break
    L.sort()
    print(*L)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
list = []
while True:
    t1, t2 = map(int, input().split())
    if t1 == 0 and t2 == 0:
        break
    list.append([t1, t2])

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


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

Submission status: Accepted

Solution code:
base_list = list()
i = 0
while i < 3000:
    input_a = input("")
    term = input_a.split(' ')
    a = int(term[0])
    b = int(term[1])
    if(a == 0 and b == 0):
        break
    else:
        subset_list = [a, b]
        subset_list.sort()
        base_list.append(subset_list)

    i += 1

for bl in base_list:
    print("{} {}".format(bl[0], bl[1]))

Submission status: Accepted

Solution code:
while True:
    sorted_input = sorted(map(int,input().split()))
    if all([item == 0 for item in sorted_input]):
        break
    else:
        print(*sorted_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(f"{b} {a}")
    else:
        print(f"{a} {b}")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a,b = (int(x) for x in 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:
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:
# -*- coding: utf-8 -*-
flag = 0
while flag == 0:
    x = list(map(int, input().split()))
    x.sort()
    if x[0] != 0 or x[1] != 0:
        print(x[0], x[1])
    else:
        flag = 1

Submission status: Accepted

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

if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

while True:
    x1, y1 = map(int, input().split())
    if x1 == 0 and y1 == 0:
        break
    else:
        x.append(x1)
        y.append(y1)

iterations = len(x)

for i in range(iterations):
    print(min(x[i], y[i]), max(x[i], y[i]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
i=0
while i<3000:
    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:
    nums = list(map(int, input().split(' ')))
    if not any(nums):
        break
    else:
        print(' '.join(map(str, sorted(nums))))

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

Submission status: Accepted

Solution code:
def test():
    inp = [1, 1]
    while True:
        inp = list(map(int, input().split()))
        if inp[0] == 0 and inp[1] == 0:
            break
        inp.sort()
        print(f'{inp[0]} {inp[1]}')
 

if __name__ == '__main__':
    test()

Submission status: Accepted

Solution code:
samples = []
while True:
    tmp = list(map(int, input().split()))
    if tmp == [0, 0]:
        break
    samples.append(tmp)

for sample in samples:
    print(*sorted(sample))

Submission status: Accepted

Solution code:
while True:
    nums = input().split()
    if nums == ['0', '0']:
        break
    nums = list(map(int, nums))
    nums.sort()
    print(" ".join([str(n) for n in nums]))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    if x >= y:
        x, y = y, x
    
    print('{} {}'.format(x, y))

Submission status: Accepted

Solution code:
import sys
s = sys.stdin.readlines()

for e in s:
    input_l = list(map(int,e.split()))
    if input_l[0] == 0 and input_l[1] == 0:
        break
    else:
        input_l.sort()
        print(str(input_l[0]) + " " + str(input_l[1]))

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:
    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,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("%d %d" % (a, b))

Submission status: Accepted

Solution code:
for i in range(0,3000):
    a,b=input().split()
    a,b=[int(a),int(b)]
    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:
  a,b = map(int,input().split())
  if a == b == 0:
    break
  else:
    if a < b:
      print(a,b)
    else:
      print(b,a)

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:
import sys

ff = sys.stdin

while True :
    a, b = map(int, ff.readline().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
    else:
        if a <= b: print(a, b)
        else: print(b, a)

Submission status: Accepted

Solution code:
num=1
while(1):
    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:
data_set_list = []

def swap(t1, t2):
    return t2, t1

while True:
    x, y = map(int, input().split())
    if x == y == 0:
        break
    if x > y:
        x, y = swap(x, y)
    data_set_list.append((x, y))

for data in data_set_list:
    print(data[0], data[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    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
    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
    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:
        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
    
    if x < y:
        print(x, y);
    else:
        print(y, x);

Submission status: Accepted

Solution code:
x, y = [], []

for _ in range(3000):
    i, j = map(int, input().split())
    if i == 0 and j == 0:
        break
    else:
        x.append(i)
        y.append(j)
        
for k in range(len(x)):
    if x[k] < y[k]:
        print(x[k], y[k])
    else:
        print(y[k], x[k])

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:
    num = input("").split()
    x = int(num[0])
    y = int(num[1])
    
    if x == y == 0:
        break
        
    if x > y:
        tmp = x
        x = y
        y = tmp
        
    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:
        list=[a,b]
        list.sort()
        print(list[0],list[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(3001):
  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))

Submission status: Accepted

Solution code:
x = []
for i in iter(input, '0 0'):
    x.append(list(map(int, i.split())))
for i in range(len(x)):
    a = sorted(x[i])
    print(f'{a[0]} {a[1]}')

Submission status: Accepted

Solution code:
i = 0
listx, listy = [], []

while(True):
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    listx.append(x)
    listy.append(y)
    i += 1

for num in range(i):
    if listx[num] < listy[num]:
        print(listx[num], listy[num])
    else:
        print(listy[num], listx[num])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

while True:
    a,b = map(int,input().split())
    if a+b==0:break;
    if b<a : a,b = b,a
    print (a,b)

Submission status: Accepted

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

Submission status: Accepted

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