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 1:
    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:
class SwappingTwoNumbers:
    def output(self, n):
        n.sort()
        print "%d %d" % (n[0], n[1])

if __name__ == "__main__":
    stn = SwappingTwoNumbers();
    while True:
        n = map(int, raw_input().split())
        if n[0] == 0 and n[1] == 0:
            break
        stn.output(n)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
i=1
while True :
    x,y=map(int,input().split());
    if  (x,y) == (0,0) :
        break
    else :
        if x < y :
            print(x,y)
        else :
            print(y,x)

Submission status: Accepted

Solution code:
a = []
while True:
    arr = map(int,raw_input().split())
    if arr[0] == 0 and arr[1] == 0:
        break
    arr.sort()
    arr = map(str,arr)
    print ' '.join(arr)

Submission status: Accepted

Solution code:
i = 1

while i == 1:
    r = raw_input()
    x, y = r.split()
    x = int(x)
    y = int(y)
    
    if x == 0 and y == 0:
        i = 0
    elif x > y:
        print ("%d %d" %(y, x))
    else:
        print ("%d %d" %(x, y))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = []
while True:
	a = list(map(int, input().split(' ')))
	if a[0] == 0 and a[1] == 0:
		break
	a.sort()
	N.append(a)
	
for i in range(len(N)):
	print(N[i][0], N[i][1])

Submission status: Accepted

Solution code:

l=raw_input()
k=l.split()
k.sort()
f=0
#
while f==0:
        a=int(k[0])
        b=int(k[1])
        if a==b==0:
                break
        else:
                if a<b:
                        print a,b
                else:
                        print b,a
        l=raw_input()
        k=l.split()
        k.sort()

Submission status: Accepted

Solution code:
while 1:
    line=map(int,raw_input().split())
    if line==[0,0]:
        break
    else:
        op=sorted(line)
        print op[0],op[1]

Submission status: Accepted

Solution code:
tmp = 0
while True:
    i = raw_input().strip().split()
    a = int(i[0])
    b = int(i[1])
    if a == 0 and b == 0:
        break
    if a > b:
        tmp = a
        a = b
        b = tmp
    print a,b

Submission status: Accepted

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

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
import sys
i = sys.stdin

for line in i:
    a,b = map(int,line.split())
    if a == 0 and b == 0: break
    if a < b:
        print(a,b)
    else:
        print(b,a)

Submission status: Accepted

Solution code:
input_array=[]

while True:
    a, b = [int(x) for x in raw_input().split(" ")]

    if a == 0 and b == 0:
        break
    elif a > b:
        tmp = a
        a = b
        b = tmp

    input_num = str(a) + " " + str(b)
    input_array.append(input_num)

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

Solution code:
# coding:utf-8
# ??\??????????????´??°????°???????????????????

i = 1
x = 1
y = 1
while x != 0 or y != 0:
    xy = raw_input().split()
    x = int(xy[0])
    y = int(xy[1])
    if x == 0 and y ==0:
        break
    if x < y :
        print x,y
    else:
        print y,x

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

while 1:
    x = sys.stdin.readline().strip()
    x_list = list(map(int,x.split(" ")))
    
    if x_list[0] == 0 and x_list[1] == 0 :
        break
    
    x_list.sort()
    print(x_list[0],x_list[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main(): 
	nums = []
	while True:
		x = input().split(" ")
		if x == ["0","0"]:
			break
		x.sort(key = int)
		nums.append(x)
	for i in nums:
			print(" ".join(i))
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
import sys
for i in sys.stdin:
  x, y = map(int, i.split())
  if (x, y) == (0, 0): break
  elif x <= y:
    print(x, y)
  else:
    print(y, x)

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in xrange(10000) :

    print str(min(a, b)) + ' ' + str(max(a, b))

    a, b = map(int, raw_input().split())

    if a == 0 and b == 0 :
        break

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def number():
    a = []
    b = []
    i = 0
    while True:
        x,y = map(int,input().split())
        if x == 0 and y == 0:
            break
        a.append(x)
        b.append(y)
        i += 1
    for j in range(len(a)):
        if a[j] < b[j]:
            print (a[j],b[j])
        else:
            print (b[j],a[j])

if __name__ == "__main__":
    number()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in range(3000):
    list = map(int, raw_input().split())
    x = list[0]
    y = list[1]
    if ((x == 0) and (y == 0)):
        break
    else:
        if x <= y:
            print '%d %d'%(x, y)
        else:
            print '%d %d'%(y, x)

Submission status: Accepted

Solution code:
# coding: utf-8
while True :
	line = list( map(int, input().split(' ')))

	line.sort()

	if(line[0] == 0 and line[1] == 0) :
		break;
	print('{0} {1}'.format(line[0], line[1]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = []
while True:
    x = map(int, raw_input().split())
    if x[0] == 0 and x[1] == 0:
        break
    if x[0] > x[1]:
        tmp = x[1]
        x[1] = x[0]
        x[0] = tmp
    a.append([x[0], x[1]])
for i in range(len(a)):
    print a[i][0], a[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:
        print(b, a)
    else :
        print(a, b)

Submission status: Accepted

Solution code:
while 1:
    x, y = map(int, input().split())
    if x == y == 0: break
    print("{} {}".format(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
    print(" ".join(map(str,sorted(n))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    x, y = [int(i) for i in input().split()]
    
    if x == y == 0:
        break

    if x > y:
        x, y = y, x

    print(x, y)

Submission status: Accepted

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

    if x == y == 0:
        break

    if x > y:
        x, y = y, x

    print(x, y)

Submission status: Accepted

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

    if x == y == 0:
        break

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

Submission status: Accepted

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

  if x == y == 0:
      break
 
  if x > y:
      x, y = y, x

  print(x, y)

Submission status: Accepted

Solution code:
while True:
    x, y = [int(i) for i in input().split()]
    
    if x == y == 0:
        break
     
    if x > y:
        x, y = y, x
   
    print(x, y)

Submission status: Accepted

Solution code:
while True:
     x, y = [int(i) for i in input().split()]
 
     if x == y == 0:
         break
 
     if x > y:
         x, y = y, x
 
     print(x,y)

Submission status: Accepted

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

    if x == y == 0:
        break

    if x > y:
        x, y = y, x

    print(x,y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    x, y = [int(i) for i in input().split()]
 
    if x == y == 0:
        break
 
    if x > y:
        x, y = y, x
 
    print(x, y)

Submission status: Accepted

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

    if x == y == 0:
       break

    if x > y:
        x,y = y,x

    print(x,y)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    list=[int(x) for x in input().split()]
    if any(list):
        [a,b]=sorted(list)
        print(str(a)+" "+str(b))
    else:
        break

Submission status: Accepted

Solution code:
while 1:
	a,b = map(int, raw_input().split())
	if a == b == 0:
		break
	elif a < b:
		print "%s %s" % (a,b)
	else:
		print "%s %s" % (b,a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import string

while True:
    L = string.split(raw_input())
    x = int(L[0])
    y = int(L[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:
    a = input()
    b = a.split(' ')
    b.sort(key=int)
    if int(b[0]) == 0 and int(b[1]) == 0:
        break
    print('%s %s' % (b[0],b[1]))

Submission status: Accepted

Solution code:
import sys

n = sys.stdin.readlines()
for i in n:
    a = [int(x) for x in i.split()]
    if a[0] == 0 and a[1] == 0:
        break
    print(*sorted(a))

Submission status: Accepted

Solution code:
import sys

n = sys.stdin.readlines()
for i in n:
    a, b = [int(x) for x in i.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:
	n,k = map(int, raw_input().split())
	if 0==n and 0==k:
		break
	if n > k:
		print k,n
	else:
		print n,k

Submission status: Accepted

Solution code:
def swap(a, b ,item):
    c = item[a]
    item[a] = item[b]
    item[b] = c
    
AB = input().split()
a = int(AB[0])
b = int(AB[1])
while a!=0 or b!=0:
    if a>b:
        swap(0, 1, AB)
    print(int(AB[0]), int(AB[1]))
    AB = input().split()
    a = int(AB[0])
    b = int(AB[1])

Submission status: Accepted

Solution code:
small = []
large = []

while True:
	input_a, input_b = map(int, raw_input().split())
	if input_a == 0 and input_b == 0:
		break
	else:
		if input_a < input_b:
			small.append(input_a)
			large.append(input_b)
		else:
			small.append(input_b)
			large.append(input_a)

for (n, m) in zip(small, large):
		print n, m

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

while True:
    data = sys.stdin.readline().strip().split(' ')
    x = int(data[0])
    y = int(data[1])
    if x == 0 and y == 0:
        break
    if x < y:
        print('%d %d' % (x, y))
    else:
        print('%d %d' % (y, x))

Submission status: Accepted

Solution code:
while 1:
    x,y = map(int, raw_input().split())

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

    if x>y:
        box = x
        x = y
        y = box

    print x,y

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = []
while True:
    d = list(map(int, input().split()))
    if d == [0,0]:
        break
    d.sort()
    a.append(d)
for x in a:
    print('{} {}'.format(x[0],x[1]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: UTF-8

def Swap(a):
    for i in range(len(a)):
        if a[i] == "0 0":
            break
        x = int(a[i].split(" ")[0])
        y = int(a[i].split(" ")[1])
        box = 0
        if x > y:
            box = x
            x = y
            y = box
        print(str(x)+" "+str(y))

if __name__=="__main__":
    a = []
    for i in range(3000):
        a.append(input())
        if a[i] == "0 0":
            break
    Swap(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
	(x, y) = map(lambda s:int(s), 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:
        num=a
        a=b
        b=num
    print(a,b)

Submission status: Accepted

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

import sys

for line in sys.stdin.readlines():
    x, y = line.strip().split()

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

    if int(x) < int(y):
        print("{} {}".format(x, y))
    else:
        print("{} {}".format(y, x))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L1= []
L2= []
N= 0
while True:
	x,y= map(int,input().split())
	if(x==y==0):
		break
	if(x> y):
		x,y= y,x
	L1.append(x)
	L2.append(y)
	N= N+1

for i in range(N):
	print(L1[i],L2[i])

Submission status: Accepted

Solution code:
while True:
    a, b = [int(x) for x in input().split()
]
    if a == b == 0:
        break
    print(a, b) if a < b else print(b, a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

  if x < y:
    print("{} {}".format(x, y))
  else:
    print("{} {}".format(y, x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import fileinput

if __name__ == '__main__':
    for line in fileinput.input():
        tokens = line.strip().split()
        a, b = int(tokens[0]), int(tokens[1])
        if a == b == 0:
            pass
        elif a <= b:
            print '%d %d' % (a, b)
        elif b < a:
            print '%d %d' % (b, a)

Submission status: Accepted

Solution code:
# coding: utf-8

x,y=map(int,input().split())

while not(x==0 and y==0):
    if x>y:
        x,y=y,x
    print(str(x)+" "+str(y))

    x,y=map(int,input().split())

Submission status: Accepted

Solution code:
l = []
cnt = 0
while 1:
    x = input()
    if x == '0 0':
        break
    l.append(x)
    cnt += 1
for i in range(cnt):
    f = list(map(int,l[i].split()))
    f.sort()
    print(f[0],f[1],sep=' ')
    del f[:]

Submission status: Accepted

Solution code:
while True:
    x = input()
    x = x.split(" ")
    x = [int(z) for z in x]
    if x[0] == 0 and x[1] == 0: break
    if x[0] < x[1]:
        print("%d %d" % (x[0], x[1]))
    else:
        print("%d %d" % (x[1], x[0]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
    x, y = [int(a) for a in input().split(" ")]
    if x == 0 and y == 0: break
    print(" ".join([str(b) for b in sorted([int(c) for c in [x, y]])]))

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
    [a, b] = [int(x) for x in line.split()]

    if [a, b] == [0, 0]:
        break

    if b < a:
        print(" ".join([str(x) for x in [b, a]]))
    else:
        print(" ".join([str(x) for x in [a, b]]))

Submission status: Accepted

Solution code:
import sys
while(True):
    x, y =  map(lambda x: (int, int)[x.isdigit()](x) ,sys.stdin.readline().split(None, 1))
    if x == 0 and y == 0:
        break
    if x < y:
        print("%d %d" % (x, y))
    else:
        print("%d %d" % (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:
        t=a
        a=b
        b=t
    print("{0} {1}".format(a,b))

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:
matrix = []
while True:
    values = input()
    i_list = [int(x) for x in values.split()]
    if 2 == i_list.count(0):
        break
    matrix.append(i_list)

for i in matrix:
    a, b = sorted(i)
    print(a, b)

Submission status: Accepted

Solution code:
'''
ITP-1_3-C
 2 ????????°?????????
???????????´??° x, y ?????????????????????????????????????°?????????????????????????????????°?????????????????????????????????
?????????????????????????????\?????????????????????????????????????????????????????????????????????????????¨?????¨?????????????????????
???Input
??\???????????°????????????????????????????§?????????????????????????????????????????????????????????§??????????????????????????´??° x, y ?????????
?????????????§?????????????????????????
???Output
??????????????????????????¨??????x ??¨ y ????°????????????????????????????????????????????????????????????????x ??¨ y ????????????????????????????????\??????????????????
'''
# import
import sys

# input???????????????
for inputData in sys.stdin:
    inputData = inputData.split(" ")
    inputData01, inputData02 = int(inputData[0]), int(inputData[1])
    # 0?????´??? ????????????
    if inputData01 == 0:
        if inputData02 == 0:
            break

    if inputData01 > inputData02:
        outputData01 = inputData02
        outputData02 = inputData01
    else:
        outputData01 = inputData01
        outputData02 = inputData02

    # ????????????
    print((outputData01), (outputData02))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    while True:
        key_in = input()
        #data = key_in.split(' ')
        data = [int(x) for x in key_in.split(' ')]
        data.sort()

        if data[0] == 0 and data[1] == 0:
            break
        else:
            print('{0} {1}'.format(data[0], data[1]))

Submission status: Accepted

Solution code:
data = input().split()
a = int(data[0])
b = int(data[1])
while(a != 0 or b != 0):
	if a > b:
		temp = a
		a = b
		b = temp
	print(str(a) + " " + str(b))
	data = input().split()
	a = int(data[0])
	b = int(data[1])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
for i in range(1, 10000):
    x, y = map(int, input().split())
    if(x == 0 and y == 0): break
    if(x < y): print(str(x) + " " + str(y))
    else: print(str(y) + " " + str(x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=[]
y=[]
while True:
    i,j=map(int,raw_input().split())
    if (i,j)==(0,0):
        break;
    x.append(i)
    y.append(j)
X=iter(x)
Y=iter(y)

for a in X:
    b=Y.next()
    if a<b:
        print('%d %d'%(a,b))
    else:
        print('%d %d'%(b,a))

Submission status: Accepted

Solution code:
for i in range(1,3001):
    x, y = [int(i) for i in input().split()]
    if x + y == 0:
        break
    elif x>y:
        print(y,x)
    elif x<y:
        print(x,y)
    else:
        print(x,y)

Submission status: Accepted

Solution code:
x,y=input().split()
while (x!='0'or y!='0'):
    if(int(x)>int(y)):print("{} {}".format(y,x))
    else:print("{} {}".format(x,y))
    x,y=input().split()

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

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

Submission status: Accepted

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

while True:
    x,y = list(map(int, input().split()))
    
    if x == 0 and y == 0:
        break
    
    if x < y:
        print(str(x) + " " + str(y))
    else:
        print(str(y) + " " + str(x))

Submission status: Accepted

Solution code:
import sys


list_line = sys.stdin.readlines()

for index, element in enumerate(list_line):
    list_line[index] = element.rstrip('\n')

for element in list_line:
    x_y_list = element.split(" ")
    x = int(x_y_list[0])
    y = int(x_y_list[1])
    if x == 0 and y == 0:
        sys.exit()
    if x > y:
        print(str(y) + " " + str(x))
    else:
        print(element)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
dataset = []
while True:
    x, y = map(int, input().split())
    if (x < 0 and x > 10000) and (y < 0 and y > 10000):
        break
    elif (x is 0) and (y is 0): 
        break

    listed = []
    listed.append(x)
    listed.append(y)
    dataset.append(listed)
    if len(dataset) >= 3000:
        break

for i in dataset:
    if i[0] > i[1]:
        print("{0} {1}".format(str(i[1]), str(i[0])))
    elif i[0] < i[1]:
        print("{0} {1}".format(str(i[0]), str(i[1])))
    else:
        print("{0} {1}".format(str(i[0]), str(i[1])))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
 
while True:
 x, y = map(int,sys.stdin.readline().split())
 if (x == 0) & (y == 0):
  break
 elif x < y :
  print(x, y)
 else : 
  print(y, x)

Submission status: Accepted

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

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