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:
count = 1
while(1):
    x = raw_input()
    if(x == "0 0"):
        break
    x = x.split(" ")
    x = map(int, x)
    x.sort()
    x = map(str, x)
    print " ".join(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 :
            a, b = y, x
            print(a, b)
        else :
            print(x, y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    x,y = 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:
#Repetitive Processing - Swapping Two Numbers

i=0
while True:
    x,y=map(int,input().split())
    i+=1
    if x==0 and y==0: break
    if x > y:
        c=x
        x=y
        y=c
    print(x,y)

Submission status: Accepted

Solution code:
def ex(x, y):
    if x > y:
        tmp = x
        x = y
        y = tmp

    return x, y

def ex2num():
    r1, r2 = input().split(" ")
    r1 = int(r1)
    r2 = int(r2)
    while (0 != r1) or (0 != r2):
        r1, r2 = ex(r1, r2)
        print(r1, r2)
        r1, r2 = input().split(" ")
        r1 = int(r1)
        r2 = int(r2)

    return 0

if __name__ == "__main__":
    ret = ex2num()

Submission status: Accepted

Solution code:
def ex2num():
    while (True):
        r1, r2 = input().split(" ")
        r1 = int(r1)
        r2 = int(r2)
        if (0 == r1) and (0 == r2):
            break
        if r1 < r2:
            print(r1, r2)
        else:
            print(r2, r1)

    return 0

if __name__ == "__main__":
    ret = ex2num()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    x, y = input().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(True):
    i,j=input().split()
    
    if i != '0' or j != '0':
        if int(i) <= int(j):
            print('{} {}'.format(i,j))
        else:
            print('{} {}'.format(j,i))
    else:
        break

Submission status: Accepted

Solution code:
while(True):
    i,j=input().split()
    
    if i != '0' or j != '0':
        if int(i) <= int(j):
            print(i+' '+j)
        else:
            print(j+' '+i)
    else:
        break

Submission status: Accepted

Solution code:
while(True):
    i,j= map(int, input().split())
    if i != 0 or j != 0:
        if i <= j:
            print(i,j)
        else:
            print(j,i)
    else:
        break

Submission status: Accepted

Solution code:
from sys import stdin
data = list(stdin)[:-1]
for line in data:
	tmp = list(map(int, line.strip('\n').split(' ')))
	tmp.sort()
	print(' '.join(map(str, tmp)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8

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

    if x < y:
        print(str(x) + " " + str(y))
    else:
        print(str(y) + " " + str(x))

Submission status: Accepted

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

Submission status: Accepted

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

import sys

while True:
    a, b = map(int, sys.stdin.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:
	x = list(int(i) for i in input().split())
	if x[0] == 0 and x[1] == 0:
		break;
	x.sort()
	print(x[0],x[1],sep=" ")

Submission status: Accepted

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

  elif x and y !=0:
    print(x,y)
    continue

  elif x==y==0:
    break

Submission status: Accepted

Solution code:
i = 1
while True:
    x, y = map(int, input().split())
    if x >= 0 and x <= 10000:
        if y >= 0 and y <= 10000:
            if x == 0 and y == 0:
                break
            if i > 3000:
                break
            if x > y:
                z = x
                x = y 
                y = z
            print('{0} {1}' .format(x, y))
    i += 1

Submission status: Accepted

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

Submission status: Accepted

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

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:
    x = sorted(list(map(int, input().rstrip().split())))
    if x == [0, 0]:
        break
    for i, n in enumerate(x, 1):
        if i == len(x):
            print(n)
        else:
            print(n, end=" ")

Submission status: Accepted

Solution code:
#!/usr/bin/env python

if __name__ == '__main__':
    while True:
        x, y = map(int, raw_input().split())
        if x == 0 and y == 0:
            break

        print ('{0} {1}' if x < y else '{1} {0}').format(x,y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=[]
i=0
s=0
def judge(n,m):
    if n<=m:
        return str(n)+" "+str(m)
    else:
        return str(m)+" "+str(n)

while 1:
    l= input().split()
    n=int(l[0])
    m=int(l[1])
    if n==0 and m==0:
        break
    else:
        a.append(judge(n,m))
        i=i+1

while s<i:
    print(a[s])
    s=s+1

Submission status: Accepted

Solution code:
s = ''
while True:
    a = list(map(int,input().split(' ')))
    if a[0] == 0 and a[1] == 0:
        break
    else:
        a.sort()
        s += ' '.join(map(str, a)) + '\n'
if s != '':
    print(s[:-1])

Submission status: Accepted

Solution code:
a = 100
while a != 0:
    lis = [int(x) for x in input().split()]
    if lis[0]+lis[1] != 0:
        lis.sort()
        print(lis[0],end = " ")
        print(lis[1])
    a = lis[0]+lis[1]

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b= map(int, input(). split())
while a!=0 or b!=0:
    list1=[a, b]
    list1.sort()
    print(str(list1[0]) + " " + str(list1[1]))
    a, b= map(int, input(). split())

Submission status: Accepted

Solution code:
while True:
    val = [int(i) for i in input().split()]
    val.sort()
    if val[0] == val[1] == 0:
        break
    else:
        print(val[0], val[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:
    x, y = input().split()
    x = int(x)
    y = int(y)
    if (x != 0) or (y != 0):
        if x < y:
            print(x, y)
        else:
            print(y, x)
    else:
        break

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:
last = 1
while last != 0:
	num = list(map(int, input().split(" ")))
	if num[0] == 0 and num[1] == 0:
		last = 0
	else:
		if num[0] >= num[1]:
			print(str(num[1]) + " " + str(num[0]))
		else:
			print(str(num[0]) + " " + str(num[1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
### スペース区切りの２つの数値を入力し、小さい順に並べる。
### 数値が 二つとも0 まで、入力を繰り返す。
### 数値入力が終わったらまとめて表示する。


int_in = [1,1]
int_out = []

## 標準入力・入力内容の分割
while 1:
	str_in = raw_input()
	int_in = map(int, str_in.split())
	if int_in[0] == 0 :
		if int_in[1] == 0:
			break
	## 数値を小さい順に入れ替える。
	if int_in[0] > int_in[1]:
		swap = int_in[0]
		int_in[0] = int_in[1]
		int_in[1] = swap
	## 出力用配列へ追加する。
	int_out.extend([int_in])

##表示
for i in int_out:
		print(repr(i[0]) + ' ' + repr(i[1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = []
i = 0
while i < 3000:
    n = [int(i) for i in input().split()]
    if n[0] == 0 and n[1] == 0:
        break
    m = 0
    if n[0] > n[1]:
        m = n[0]
        n[0] = n[1]
        n[1] = m
    print(str(n[0]) + " " + str(n[1]))
    i += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans = []
while True:
    a,b = map(int,raw_input().split())
    if a == 0 and b == 0:
        break
    elif a < b:
        ans.append([a,b])
    else:
        ans.append([b,a])
for char in ans:
    print str(char[0])+" "+str(char[1])

Submission status: Accepted

Solution code:
import sys

l = []
for i in sys.stdin:
    l.append(i)

for i in range(0,len(l)):
    l[i] = l[i].split()

for i in range(0,len(l)):
    if l[i][0] == '0' and l[i][1] == '0':
        continue
    x = l[i][0]
    y = l[i][1]
    if int(y) < int(x):
        temp = x
        x = y
        y = temp
    print(x,y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = []
y = []
while(1):
    n1,n2 = map(int,input().split())
    if n1 == 0 and n2 == 0 :
        break
    else:
        x.append(n1)
        y.append(n2)    
for i in range(len(x)):
    if(x[i]>y[i]):
        x[i],y[i] = y[i],x[i]
        print("{} {}".format(x[i],y[i]))
    else:
        print("{} {}".format(x[i],y[i]))

Submission status: Accepted

Solution code:
while(True):
  temp = raw_input()
  temp_list = temp.split()
  x = int(temp_list[0])
  y = int(temp_list[1])
  if x == y and x == 0:
    break
  else:
    print(str(min([x, y]) ) + " " + str(max([x, y]) ))

Submission status: Accepted

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

    if a > b:
        tmp = a
        a = b
        b = tmp

    count += 1
    print(a, b, sep = ' ')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while 1:
	x,y = map(int,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:
a = []

while True:
    a = list(map(int,input().rstrip().split()))
    if a[0] == a[1] == 0:
        break
    a = sorted(a)
    x = a[0]
    y = a[1]
    print(x,y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = 0
x = []
y = []
while(1):
    a,b = map(int,input().split())
    if a <= b:
        x.append(a)
        y.append(b)
    else :
        x.append(b)
        y.append(a)
    if x[i] == 0 and y[i] == 0:
        break
    i += 1

for j in range(i):
    print(x[j],y[j])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! python3
# swapping_two_numbers.py

for i in range(3000):
    x, y = [int(n) for n in input().split(' ')]
    if x == 0 and y == 0:
        break

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

Submission status: Accepted

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

    print(ary[0], ary[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:
    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=sorted([int(x) for x in input().split()])
    if x==0 and y==0: break
    print(x,y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    while True:
        a = numinput()
        if a[0] == 0 and a[1] == 0: break
        if a[0] < a[1]: print('%d %d' % (a[0], a[1]))
        else: print('%d %d' % (a[1], a[0]))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
flag = True
while flag:
    data = list(map(int,input().split()))
    if((data[0]+data[1])==0):
        flag = False
    else:
        out = sorted(data)
        print("{0} {1}".format(out[0],out[1]))

Submission status: Accepted

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

for i in range(len(a)):
    sort = sorted(a[i])
    print(sort[0], sort[1])

Submission status: Accepted

Solution code:
r=[]
while 1:
    a=sorted([int(i) for i in input().split()])
    if a!=[0,0]:
        r.extend([a])
    else:
        break
[print("{} {}".format(i[0],i[1])) for i in r]

Submission status: Accepted

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


while True:
   n = map(int,raw_input().split())
   if n == [0,0]:
      break
   a = sorted(n)
   print('%i %i' % (a[0],a[1]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
i = 0
while 1:
	arr = list(map(int, input().split()))
	x = arr[0]
	y = arr[1]
	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 = [int(a) for a 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

if __name__ == '__main__':
    for line in sys.stdin.read().splitlines():
    	if line == '0 0':
    		break
    	a, b=map(int, line.split())
    	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
    print(x, y) if x < y else print(y, x)

Submission status: Accepted

Solution code:
def swap(a, b):
    dummy = a
    a = b
    b = dummy
    return a, b


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

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

    print(x, y)

Submission status: Accepted

Solution code:
lis = []
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:
i = 1
while True:
    A = list(map(int, input().split()))
    if A != [0, 0]:
        print("{} {}".format(sorted(A)[0], sorted(A)[1]))
        i += 1
    else:
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Swapping Two Numbers

zeroCount = 0
while zeroCount == 0:
    numbers = [int(i) for i in input().rstrip().split()]
    # print(numbers)
    if numbers[0] == 0 and numbers[1] == 0:
        zeroCount += 1
    else:
        swap = sorted(numbers)
        # print(swap)
        a = [str(n) for n in swap]
        print(" ".join(a))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=1
b=1
l=[]
while(a!=0 or b!=0):
    a,b=map(int,input().split())
    l.append([a,b])
for i in range(len(l)):
    if l[i][0]>l[i][1]:
        print(l[i][1],l[i][0])
    elif l[i][0]==0 and l[i][1]==0:
        break
    else:
        print(l[i][0],l[i][1])

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(line):
    
    for array in line:
        
        if array[0] >= array[1]:
            temp = array[0]
            array[0]=array[1]
            array[1] = temp
            print('{0} {1}'.format(array[0],array[1]))
        else:
            print('{0} {1}'.format(array[0],array[1]))

 

def answer():
    line=[]
    while True:
        s = input().split()
        
        if s[0]=='0' and s[1]=='0':
            break
        line.append(list(map(int, s)))
        
        
        
   
    
    solve(line)

if __name__ =='__main__':
    answer()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
#!/usr/bin/env python
# coding: utf-8

def main():
	swapping_numbers = []
	while True:
		x, y = [int(n) for n in raw_input().split(" ")]
		if x == 0 and y == 0:
			break
		swapping_numbers.append([x, y])

	for swapping_number in swapping_numbers:
		if swapping_number[0] > swapping_number[1]:
			swapping_number[0], swapping_number[1] = swapping_number[1], swapping_number[0]
		print "%d %d" % tuple(swapping_number)

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
import sys
for line in sys.stdin:
    a,b = line.split()
    a,b = int(a),int(b)
    if a == 0 and b == 0: break
    if b<a: a,b = b,a
    print '%d %d' %(a, b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r = 0
while r == 0:
        n = map(int,raw_input().split())
        if n[0] == n[1] == 0:
                break
        elif n[0] < n[1]:
                print n[0] ,
                print n[1] 
        else:
                print n[1] ,
                print n[0]

Submission status: Accepted

Solution code:
from __future__ import division, print_function
from sys import stdin
while True:
    li = list(sorted(int(s) for s in stdin.readline().split()))
    if not any(li):
        break
    print(*li)

Submission status: Accepted

Solution code:
import sys
for line in sys.stdin:
    cols = map(int, line.rstrip('\n').split(' '))
    x, y = cols[0], cols[1]
    if x == 0 and y == 0: break
    print '%d %d' % (min(x, y), max(x, y))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    output = []
    while True:
        x, y = map(int, raw_input().split(' '))
        if x == 0 and y == 0:
            break
        else:
            if x > y:
                output.append('%d %d' % (y, x))
            else:
                output.append('%d %d' % (x, y))

    for line in output:
        print line

Submission status: Accepted

Solution code:
while True:
  (x, y) = map(int, raw_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:
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:
while True:
 x,y=map(int,raw_input().split())
 if x==0 and y==0:break
 if x>y:
  tmp=x
  x=y
  y=tmp
 print str(x)+" "+str(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:
l = []

while(1):
    num = list( map(int, input().split()) )
    x = num[0]
    y = num[1]
    if(x==0 and y==0):
        break
    l.append(x)
    l.append(y)

pairs = int(len(l)/2)

for i in range(0,pairs):
    a = l[i*2]
    b = l[i*2+1]
    if(a<=b):
        print(a,end=" ")
        print(b)
    else:
        print(b,end=" ")
        print(a)