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:
import sys
while True :
    ab = list(map(int,sys.stdin.readline().split()))
    a = ab[0]
    b = ab[1]
    if a == 0 and b == 0 :
        break
    else :
        ab = sorted(ab)
        print(ab[0],ab[1])

Submission status: Accepted

Solution code:
def method(a,b):
    if(a<b):
        print a,b
    else:
        print b,a

while 1:
    a,b=map(int,raw_input().split())
    if a==0 and b==0:
        break
    method(a,b)

Submission status: Accepted

Solution code:
num = []
while True:
    n = input()
    a, b = [int(x) for x in n.split()]
    if a == 0 and b == 0:
        break
    num.append([a, b])

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

Submission status: Accepted

Solution code:

while True:
    a, b = input().split()
    a = int(a)
    b = int(b)

    if (a == 0) & (b == 0):
        break
    if a <= b:
        print(a, b)
    else:
        print(b, a)

Submission status: Accepted

Solution code:
import sys
         
while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split(' ')]
         
    if x == 0 and y == 0:
        break
         
    if x > y:
        z = x
        x = y
        y = z
         
    print(x, y)

Submission status: Accepted

Solution code:
import sys
count = 1
while True:
    x, y = sys.stdin.readline().strip().split()
    if x == '0' and y == '0':
        break
    elif int(x) < int(y):
        print("%s %s" % (x, y))
    else:
        print("%s %s" % (y, x))
    count += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
list = []

while True:
    a, b = [int(i) for i in input().split()]
    if a == 0 and b == 0:
        break
    if a < b:
        list.append([a,b])
    else:
        list.append([b,a])

for i in range(len(list)):
    print(list[i][0], list[i][1])

Submission status: Accepted

Solution code:

i = 0
j = 0
lis = []
while True:
    x,y = input().split()
    x = int(x)
    y = int(y)
    if x > y:
        i = x
        x = y
        y = i

    if x == 0 and y == 0:
        break
    fmt = "{a} {b}"
    s = fmt.format(a = x,b = y)
    lis.append(s)
    j += 1

for i in range(j):
    print(lis[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
    x,y=map(int,input().split())
    if not x+y:break
    print(*[y,x] if x>y else [x,y])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
for c in sys.stdin:
    a,b=sorted(map(int,c.split()))
    if a==b==0:break
    print(a,b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
for c in sys.stdin:
    a,b=sorted(map(int,c.split()))
    if a+b==0:break
    print(a,b)

Submission status: Accepted

Solution code:
import sys
while 1:
    (a,b)=[int(c)for c in sys.stdin.readline().split(' ')]
    if a==0 and b==0:break
    if a>b:a,b=b,a
    print(a,b)

Submission status: Accepted

Solution code:
import sys
   
a = []
for line in sys.stdin:
    x,y = map(int,line.split(" "))
    if x == 0 and y == 0:
      break
    item = [x,y]
    item.sort()
    a.append(item)
   
for x,y in a:
  print "%s %s" %(x,y)

Submission status: Accepted

Solution code:
while True:
    x, y = [int(i) for i in input().split()]
    if x == 0 and y == 0:
        break
    else:
        if x > y:
            x, y = y, x
        print('{x} {y}'.format(**locals()))

Submission status: Accepted

Solution code:
import fileinput

for line in fileinput.input():
    tokens = list(map(int, line.strip().split()))
    tokens.sort()
    a, b = tokens[0], tokens[1] 
    if a == 0 and b == 0:
        break
    else:
        print(a, b)

Submission status: Accepted

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

    print(x, y)

Submission status: Accepted

Solution code:
def sort_two_numbers(a, b):
    """
    a: int
    b: int
    returns a sorted list

    >>> sort_two_numbers(1, 3)
    [1, 3]
    >>> sort_two_numbers(3, 1)
    [1, 3]
    """
    result = []
    
    if a < b:
        result.append(a)
        result.append(b)
    else:
        result.append(b)
        result.append(a)

    return result

if __name__ == '__main__':
#    import doctest
#    doctest.testmod()

    while True:
        try:
            (a, b) = [int(i) for i in input().split(' ')]
            if a == 0 and b == 0:
                break
            print('{0[0]} {0[1]}'.format(sort_two_numbers(int(a), int(b))))
        except EOFError:
            break

Submission status: Accepted

Solution code:
a=1
while 1:
	l = map(int,raw_input().split())
	if l == [0,0]:
		break
	else :
		print ' '.join(map(str,sorted(l)))
		a += 1

Submission status: Accepted

Solution code:
#!usr/bin/env python3

def string_two_numbers_spliter():
    x, y = [int(i) for i in input().split()]
    return x, y


def swap_two_numbers_asc(x, y):
    x, y = y, x
    return x, y


def main():
    while True:
        x, y = string_two_numbers_spliter()
        if x == 0 and y == 0:
            break
        if x > y:
            x, y = swap_two_numbers_asc(x, y)
        print('%d %d' % (x, y))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
  a = list(map(int, input().split()))
  if sum(a) == 0:
    break
  print(' '.join(list(map(str, sorted(a)))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
    line = input()
    words = line.split()
    x = words[0]
    y = words[1]
    if (x == '0') and (y == '0'):
        break
    elif int(x) > int(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)
    else:
        print(b,a)

Submission status: Accepted

Solution code:
while True:
	s = raw_input().rstrip().split(" ")
	if s[0]=="0" and s[1]=="0":break
	if int(s[0])>int(s[1]):print s[1]+" "+s[0]
	else:print s[0]+" "+s[1]

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    while True:
        x,y = map(int,input().split())
        if x is not 0 or y is not 0 :
            if x > y:
                tmp = x
                x = y
                y = tmp
            print("%d %d"%(x,y))
        else:
            break

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

while True:
    x = sys.stdin.readline().split()
    a, b = map(int, x)
    if (a == 0) & (b == 0):
        break
    
    if a < b:
        print(a, b)
    else:
        print(b, a)

Submission status: Accepted

Solution code:
a=[]
while True:
    m,n=input().split()
    if m==n=="0":
        break
    else:
        a.append(sorted([int(m),int(n)]))
for i in range(len(a)):
    print("{0} {1}".format(a[i][0],a[i][1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

for s in sys.stdin:
    a, b = sorted(map(int, s.split()))
    if a == b == 0:
        break
    print(a, b)

Submission status: Accepted

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

    if x == y == '0' :
        break
    x = int(x)
    y = int(y)
    if x < y : print(x, y)
    else     : print(y, x)

Submission status: Accepted

Solution code:
while True :
    x, y = [int(temp) for temp in input().split()]

    if x == y == 0 :
        break
    if x < y : print(x, y)
    else     : print(y, x)

Submission status: Accepted

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

for i in range(len(x)):
    print(x[i][0], x[i][1])

Submission status: Accepted

Solution code:
count = -1
a = []
while True:
    count += 1
    n = input()
    if n == "0 0":
        break
    a.append(n.split())
    if int(a[count][0]) <= int(a[count][1]):
        print(a[count][0]+" "+a[count][1])
    else:
        print(a[count][1]+" "+a[count][0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
for i in sys.stdin.readlines():
    i = i.rstrip()
    i = i.split()
    x = int(i[0])
    y = int(i[1])
    if x == 0 and y == 0:
        break
    print(str(min(x,y))+" "+str(max(x,y)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
array = []
while 1:
    n = input()
    if n == "0 0":
        break
    array.append(n.split())
for i in range(len(array)):
    if int(array[i][0]) > int(array[i][1]):
        print(array[i][1]+" "+array[i][0])
    else:
        print(array[i][0]+" "+array[i][1])

Submission status: Accepted

Solution code:
from sys import stdin

for test_case in range(3000 + 2):
    x, y = map(int, stdin.readline().split())

    if not(x + y):
        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
    print(min(x,y), max(x,y))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
while True:
    x, y = map(int, input().split(" "))
    if x == 0 and y == 0:
     break
    elif x <=  y:
     print(x, y)
    elif x >= y:
     print(y, x)

Submission status: Accepted

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

import sys
import os

for s in sys.stdin:
    a, b = list(map(int, s.split()))
    if a == b == 0:
        break
    else:
        if a < b:
            print(a, b)
        else:
            print(b, a)

Submission status: Accepted

Solution code:
# coding: utf-8

list = []

while True:
    num = input().rstrip().split(" ")
    if int(num[0]) == 0 and int(num[1]) == 0:
        break
    list.append(num)


for i in range(len(list)):
    if int(list[i][0]) <= int(list[i][1]):
        print(str(list[i][0]) + " " + str(list[i][1]))
    else:
        print(str(list[i][1]) + " " + str(list[i][0]))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = 1
y = 1
i = 0
while x!=0 or y!=0:
	i+=1
	x,y = [int(i) for i in input().split()]
	if x!=0 or y!=0:
		if x <= y:
			print("{0} {1}".format(x,y))
		else:
			print("{0} {1}".format(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:

x=[]
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 1:
    a, b = map(int, input().split())

    if a == 0 and b == 0:
        break
    else:
        if a > b:
            temp = a
            a = b
            b = temp
        print(str(a) + " " + str(b))

Submission status: Accepted

Solution code:
while True:
    l = sorted([int(x) for x in input().split()])
    if l[0] == 0 and l[1] == 0:
        break
    l.sort()
    print(" ".join(map(str,l)))

Submission status: Accepted

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

    if x < y: print(x, y)
    else: print(y, x)

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !

def func():
    result = ""
    
    while (True):
        try:
            line = input().rstrip()
            numbers = line.split(" ")
            for i,item in enumerate(numbers):
                numbers[i]=int(item)
                
        except:
            print("input error")
            return -1
        
        numbers.sort()
        
        bool=True
        resultsub = ""
        for item in numbers:
            bool = bool and (item == 0)
            resultsub += str(item)+" "

        if(bool):
            break

        result += resultsub.rstrip(" ")+"\n"

    print(result.rstrip())

func()

Submission status: Accepted

Solution code:
import sys

while True :
    a, b = map(int, sys.stdin.readline().split())
    if (a == 0) & (b == 0) :
        break
   
    if a < b : print(a, b)
    else : print(b, a)

Submission status: Accepted

Solution code:
newArray = []

x, y = input().split()

while x + y != "00":
    x = int(x)
    y = int(y)
    if x < y or x == y:
        newArray.append([str(x), str(y)])
    else:
        newArray.append([str(y), str(x)])
    x, y = input().split()

for i in range(len(newArray)):
    print(newArray[i][0] + " " + newArray[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:
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
        break
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)

Submission status: Accepted

Solution code:
while True:
    x = map(int,raw_input().split())
    x.sort()
    if x[0] == 0 and x[1] == 0:
        break
    print "%d %d" %(x[0],x[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str_num = input()
while str_num != "0 0":
    num = sorted([int(x) for x in str_num.split(" ")])
    print("{} {}".format(num[0],num[1]))
    str_num = input()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        print('%d %d' % (y, x))
    else:
        print('%d %d' % (x, y))

Submission status: Accepted

Solution code:
#coding:utf-8

li = [1,1]

while sum(li)>0:
    li = list(map(int,input().rstrip().split()))
    lis=sorted(li)
    
    if sum(li)==0:
        break
    print(" ".join(map(str,lis)))

Submission status: Accepted

Solution code:
from sys import stdin

for line in stdin:
    a, b = map(int, line.rstrip().split(' '))

    if 0 == a == b:
        break

    if a < b:
        print(a, b)
    else:
        print(b, a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while(True):
    input = map(int, raw_input().split())
    if (input[0] == 0) & (input[1] == 0):
        break;
    input.sort()
    print "%d %d" % (input[0], input[1])

Submission status: Accepted

Solution code:
L = []
x,y = map(int, input().split())
while x != 0 or y != 0:
 L.append([x, y])
 x,y = map(int, input().split())

for i in L:
 i.sort()
 print(str(i[0]) + " " + str(i[1]))

Submission status: Accepted

Solution code:
import sys
while 1:
    a,b = [int(i) for i in sys.stdin.readline().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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(3000):
    s = input().split(" ")
    x = int(s[0])
    y = int(s[1])
    if x == 0 and y == 0:
        break
    if x <= y:
        print(x,y)
    else:
        print(y,x)

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
    x,y = sorted(map(int, line.rstrip().split(' ')))
    if x==0 and y==0:
        break
    print("{} {}".format(x,y))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
end = True

while end:
    data = input().split()
    data1 = int(data[0])
    data2 = int(data[1])
    if data1 == 0 and data2 ==0:
        end = False
    elif data1 <= data2:
        print(data1, data2)
    else:
        print(data2,data1)

Submission status: Accepted

Solution code:
while True:
    x, y = [int(n) for n in input().split()]
    if not (x or y):
        break
    if x < y:
        print(x, y)
    else:
        print(y, x)

Submission status: Accepted

Solution code:
for i in range(1, 10001):
    l = list(map(int,input().split()))
    if not any(l):
        break
    print(" ".join(map(str, sorted(l))))

Submission status: Accepted

Solution code:
import sys

while 1:
  str = sys.stdin.readline().strip()
  if str=="0 0":
    break
  print(" ".join(sorted(str.split(" "), key=int)))

Submission status: Accepted

Solution code:
import sys

while 1:
  str = sys.stdin.readline().strip()
  if str=="0 0":
    break
  a , b = sorted(str.split(" "), key=int)
  print(a,b)

Submission status: Accepted

Solution code:
import sys

while 1:
  str = sys.stdin.readline().strip()
  a , b = sorted(str.split(" "), key=int)
  if a =="0" and b == "0":
    break
  print(a,b)

Submission status: Accepted

Solution code:
import sys

while 1:
  str = sys.stdin.readline().strip()
  a , b = sorted(str.split(" "), key=int)
  if a == b == "0":
    break
  print(a,b)

Submission status: Accepted

Solution code:
import sys

while 1:
  a , b = sorted(sys.stdin.readline().strip().split(" "), key=int)
  if a == b == "0":
    break
  print(a,b)

Submission status: Accepted

Solution code:
import sys

while 1:
  a , b = map(int, sys.stdin.readline().split())
  if a == b == 0:
    break
  elif a > b :
    print(b,a)
  else :
    print(a,b)

Submission status: Accepted

Solution code:
import sys
from time import sleep
sleep(1)

while 1:
  a , b = map(int, sys.stdin.readline().split())
  if a == b == 0:
    break
  elif a > b :
    print(b,a)
  else :
    print(a,b)

Submission status: Accepted

Solution code:
import sys
from time import sleep
sleep(5)

while 1:
  a , b = map(int, sys.stdin.readline().split())
  if a == b == 0:
    break
  elif a > b :
    print(b,a)
  else :
    print(a,b)

Submission status: Accepted

Solution code:
import sys

while 1:
  a , b = sys.stdin.readline().split()
  if a == b == "0":
    break
  elif int(a) > int(b) :
    print(b,a)
  else :
    print(a,b)

Submission status: Accepted

Solution code:
while True:
    a,b=map(int,raw_input().split(" "))
    if 0<=a<=10000 or 0<=b<=10000:
        if a<b:
            print a,b
        elif a>b:
            print b,a
        elif a==0 and b==0:
            break
        elif True:
            print a,b

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
for c in range(3000):
    l = input().strip().split()
    x = int(l[0])
    y = int(l[1])
    if((x < 1) and (y < 1)):
        break
    elif(x > y):
        print("{0} {1}".format(y,x))
    else:
        print("{0} {1}".format(x,y))

Submission status: Accepted

Solution code:
#!/usr/bin/python

ar = []

while True:
  a = [int(i) for i in input().split()]
  if a != [0,0]:
    ar.append(a)
  else:
    break

for i in range(len(ar)):
  for j in range(len(ar[i])):
    print(sorted(ar[i])[j], end = ' ' if j != len(ar[i])-1 else '\n')

Submission status: Accepted

Solution code:
input_data = []
m=0
while 1:
	a,b = input().split()

	if int(a) == 0 and int(b) == 0:
		break
	

	elif int(a) <= int(b) :
		m+=1
		input_data.extend([a,b])
	else :
		m+=1
		input_data.extend([b,a])

n=0
			
for i in range(m):
	print(input_data[n],input_data[n+1])
	n+=2

Submission status: Accepted

Solution code:
while 1:
	a,b = input().split()

	if int(a) == 0 and int(b) == 0:
		break
	

	elif int(a) <= int(b) :
		print(a,b)
	else :
		print(b,a)

Submission status: Accepted

Solution code:
while True:
    [a, b] = sorted(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import sys
for i in sys.stdin.readlines():
        a, b = i.strip().split()
        if a == "0" and b == "0":
                break

        if int(a) < int(b):
                print("{} {}".format(a,b))
        else:
                print("{} {}".format(b,a))

Submission status: Accepted

Solution code:
import sys
for i in sys.stdin.readlines():
        a,b = i.strip().split()
        if a == "0" and b == "0":
                break

        if int(a) < int(b):
                print("{0} {1}".format(a,b))
        else:
                print("{1} {0}".format(a,b))

Submission status: Accepted

Solution code:
i = j = 0
x = ''
y = ''

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

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

  if x >= y:
    print(y,end=' ')
    print(x)

  else:
    print(x,end=' ')
    print(y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
 
for i in sys.stdin:
    i = i.split(" ")
    x, y = int(i[0]), int(i[1])
    if x == y == 0:
       break
    elif x <= y:
       print("{0} {1}".format(x, y))
    else:
       print("{0} {1}".format(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
    a=[x,y]
    a.sort()
    print("{0} {1}".format(a[0],a[1]))

Submission status: Accepted

Solution code:
for i in range(3000):
  x,y=map(int,input().split())
  if x == 0 and y == 0:
    break
  print('{0} {1}'.format(min(x,y),max(x,y)))

Submission status: Accepted

Solution code:
for _ in range(3000):
    x, y = [int(w) for w in input().split()]
    if x == 0 and y == 0:
        break
    min_ = x if x < y else y
    max_ = x if x > y else y
    print(min_, max_)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for _ in range(3000):
    x, y = list(map(int, input().split()))
    if (x==0) & (y==0):
        break
    else:
        if x < y:
            print("%d %d"%(x, y))
        else:
            print("%d %d"%(y, x))

Submission status: Accepted

Solution code:
for i in range(3000):
    x,y=[int(s) for s in input().split()]
    if x==0 and y==0:
        break
    elif x<=y:
        print("{0} {1}".format(x,y))
    else :
        print("{0} {1}".format(y,x))

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:
    i = input()
    if i == "0 0":
        break
    else:
        i_list = i.split()
        int_list = []
        int_list.append(int(i_list[0]))
        int_list.append(int(i_list[1]))
        int_list.sort()
        print(int_list[0],int_list[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
while a != [0,0]:
    print(str(min(a))+" "+str(max(a)))
    a = list(map(int,input().split()))

Submission status: Accepted

Solution code:
while True:
	data = [int(s) for s in input().split(' ')]
	if data == [0,0]:
		break
	else:
		data.sort()
		print('{0} {1}'.format(*data))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(1,3001):
	x,y=[int(i) for i in input().split()]
	if x==0 and y==0:
		break
	elif x>y:
		x,y=y,x
	print("{0} {1}".format(x,y))

Submission status: Accepted

Solution code:
while True:
    num = input()
    num_1 = num.split()
    x = int(num_1[0])
    y = int(num_1[1])
    if x + y == 0:
        break
    elif x <= y:
        print(x,y)
    else:
        print(y,x)

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
  xs = list(map(int, line.split()))

  if xs[0] == 0 and xs[1] == 0:
    break
    
  print(' '.join(map(str, sorted(xs))))