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:
###
### atcorder test program
###

### math class
class math:
    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

### input num
#i = input()
#A, B, T = [int(x) for x in i.split()]
#N = int(input())
#A = [int(x) for x in input().split()]

while True:
    temp = input()
    A, B = [int(x) for x in temp.split()]
    if A == 0 and B == 0:
        break
    if A > B :
        print(B,A)
    else:
        print(A,B)

Submission status: Accepted

Solution code:
def order_ascend(a, b):
    if  a > b:
        a, b = b, a
    return a, b

if __name__ == "__main__":
    while True:
        a, b =  map(int, input().split())
        if a == b == 0:
            break
        a, b = order_ascend(a, b)
        
        print(f"{a} {b}")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = 0
while i < 3000:
    a,b = map(int,input().split())
    if a == 0 and b ==0:
        break
    if a > b:
        tmp = a
        a=b
        b=tmp
    print(f"{a} {b}")
    i += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = []
b = []
i = 0
while i < 3000:
    c,d = map(int, input().split())
    if c == 0 and d == 0:
        break
    elif c < d:
        a.append(c)
        b.append(d)
    else:
        a.append(d)
        b.append(c)
for j in range(len(a)):
    print(a[j],b[j])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    line = input()
    data = line.split()
    x = int(data[0])
    y = int(data[1])
    if x==0 and y==0:
        break

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

Submission status: Accepted

Solution code:
import sys
for s in sys.stdin:
    x, y = map(int, s.split())
    if x == y == 0: break
    print(f'{x} {y}' if x < y else f'{y} {x}')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
while True:
    a = input()
    list = a.split()
    [x, y] = list
    x = int(x)
    y = int(y)
    list = [x, y]
    list.sort()
    [x, y] = list
    
    if x == 0 and y == 0:
        break
    else:
        x = str(x)
        y = str(y)
        k = " "
        ans = x + k + y
        print(ans)
        continue

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

Submission status: Accepted

Solution code:
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq
import itertools
import operator


# globals
inf = float('inf')
N = 0


def set_inputs():
    global N
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    # ----------MAIN----------
    while True:
        x, y = get_li()
        if x == y == 0:
            break
        print(min(x, y), max(x, y))
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def getN():
    return int(input())

def getlist():
    return list(map(int, input().split()))

while(True):
    lis = getlist()
    if lis == [0,0]:
        break
    else:
        print(" ".join(map(str, sorted(lis))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a, b = map(int, input().split(' '))
    ans = [[a, b], [b, a]][a>b]
    if a == b == 0:
        break
    else:
        print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

while (x != 0 or y != 0):
    if (x > y):
        p = x
        x = y
        y = p
    print(x, y)
    x, y = map(int, input().split())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ITP1_3_C
# 2 つの数の交換

while 1:
	d = list(map(int, input().split()))
	if d[0] == d[1] == 0:
		break
	else:
		print("{0[0]} {0[1]}".format(sorted(d)))

Submission status: Accepted

Solution code:
# xdatas, ydatas = [], []

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

#     if x == 0 and y == 0:
#         break
#     else:
#         xdatas.append(x)
#         ydatas.append(y)

# for l in range(len(xdatas)):
#     if xdatas[l] > ydatas[l]:
#         tmp = xdatas[l]
#         ydatas[l] = xdatas[l]
#         xdatas[l] = tmp

# for l in range(len(xdatas)):
#     print("{0} {1}".format(xdatas[l], ydatas[l]))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(len(x)):
    if x[i]>y[i]:
        print(y[i],x[i])
    else:
        print(x[i],y[i])

Submission status: Accepted

Solution code:
while True:
    l = input().split(' ')
    x, y = map(int, l)
    if x == 0 and y == 0:
        break;
        
    if x >= y:
        print(f'{y} {x}')
    else:
        print(f'{x} {y}')

Submission status: Accepted

Solution code:
while True:
    a, b = map(int, input().split(' '))
    min_ab = 0
    max_ab = 0
    if a == 0 and b == 0:
        break
    else:
        min_ab = min(a, b)
        max_ab = max(a, b)
    print(str(min_ab) + ' ' + str(max_ab))

Submission status: Accepted

Solution code:
c = 0
while c < 3000:
    i = input()
    a,b = list(map(int,i.split()))
    if a == 0 and b == 0:
        break
    elif a <= b:
        print(a,b)
    else:
        print(b,a)
    c += 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_3_C

if __name__ == '__main__':
    while 1:
        line = raw_input()
        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:
    i = list(map(int, input().split()))
    if i[0] == 0 and i[1] == 0:
        break
    else:
        if i[0] > i[1]:
            print(i[1], i[0])
        else:
            print(i[0], i[1])

Submission status: Accepted

Solution code:
count = 0;
while True:
    if count == 3000:
        break
    i = list(map(int,input().split()))
    x = i[0]
    y = i[1]
    if x == 0 and y == 0:
        break
    if x < y:
        print(x, y)
    if y < x:
        print(y, x)
    if x == y:
        print(x, y)
    count+= 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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('%d %d' % (A ,B))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a = input().split(' ')
    for i in range(len(a)):
        a[i] = int(a[i])
    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 = [int(_) for _ in input().split()]
    if X == Y == 0:
        exit()
    else:
        print(*sorted([X, Y]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = []
b = []

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
while a != 0 or b != 0:
    moji = str(a)+' '+str(b) if a < b else str(b)+' '+str(a)
    print(moji)
    a, b = map(int, input().split())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
for i in range(3000):
    line = input().rstrip().split()
    a = int(line[0])
    b = int(line[1])
    if (a == 0 and b == 0):
        break
    if (b < a):
        a,b = b,a
    print(str(a) + " " + str(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = []
x = []
y = []
for a in range(3000):
    w = sorted(map(int,input().split()))
    if w[0] == 0 and w[1] == 0:
        break
    x += [w[0]]
    y += [w[1]]
    num.append(w)
for i in range(len(num)):
    print(str(x[i]),str(y[i]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
is_zero = False
while not is_zero:
    list = input().split(' ')
    x = int(list[0])
    y = int(list[1])
    if x == 0 and y == 0:
        is_zero = True
    else:
        if x < y:
            print(f'{x} {y}')
        else:
            print(f'{y} {x}')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

Solution code:
num1, num2 = input().split()
while int(num1) + int(num2) > 0:
	if int(num1) >= int(num2):
		print(num2, num1, sep=' ')
	else:
		print(num1, num2, sep=' ')
	num1, num2 = input().split()

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

while True:
    arr = list(map(int,input().split()))
    if arr == [0,0]:
        break
    elif arr[0]>arr[1]:
        temp = arr[0]
        arr[0]=arr[1]
        arr[1]=temp
    print(arr[0],arr[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    a=sorted(map(int, input().split()))
    if not sum(a):break
    print(*a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

while True:
    l=input().split(" ")
    if l[0]=="0" and l[1]=="0":
        break
    
    if int(l[0]) < int(l[1]):
        print(l[0] + " " + l[1]) 
    else:
        print(l[1] + " " + l[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
    a, b = (int(n) for n in line.strip().split())
    if a == 0 and b == 0:
        break
    print(' '.join(map(str, sorted([a, b]))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    line = input()
    if line == "0 0":
        break
    lst = list(map(int, line.split()))
    if lst[0] < lst[1]:
        print("{} {}".format(lst[0], lst[1]))
    else:
        print("{} {}".format(lst[1], lst[0]))

Submission status: Accepted

Solution code:
import sys
l = []
for x in sys.stdin:
  l.append(sorted(list(int(y) for y in x.split() )))
  if l[-1] == [0,0]:
    break
  
for ll in l:
  if ll == [0,0]:
    break
  print("{} {}".format(ll[0], ll[1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
lines = sys.stdin.readlines()
for line in lines:
    x, y = map(int, line.split())
    if x == y == 0:
        break
    print(f'{x} {y}') if x < y else print(f'{y} {x}')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num_input=list(map(int,input().split()))

while num_input[0]!=0 or num_input[1]!=0:
    if num_input[0]<num_input[1]:
        print(str(num_input[0])+" "+str(num_input[1]))
    else:
        print(str(num_input[1])+" "+str(num_input[0]))
    num_input=list(map(int,input().split()))

Submission status: Accepted

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

    try:
      dat = input().split()
      x = dat[0]
      y = dat[1]
    except EOFError:
      pass

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
for i in range(1,sys.maxsize):
    x,y=list(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:
x = 1
y = 1
z = input()
x , y = [ int(a) for a in z.split() ]
while not(x == 0 and y == 0):
    if x < y:
        print (str(x) + " " + str(y))
    elif x > y:
        print (str(y) + " " + str(x))
    else:
        print (str(x) + " " + str(y))
    z = input()
    x , y = [ int(a) for a in z.split() ]

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
l = []

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

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

    l.append([a, b])

for a, b in l:
    if a > b:
        a, b = b, a
    print(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    x,y = map(int,input().split())
    if x+y != 0:
        print('%d %d' % (min(x,y),max(x,y)))
    else:
        break

Submission status: Accepted

Solution code:
for i in range(3000):
    x = input()
    a, b = x.split(' ')
    a, b = int(a), int(b)
    if a == 0 and b == 0:
        break
    if a > b:
        a, b = b, a
    print('%d %d'%(a, b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    L = list(map(int, input().split()))
    if L.count(0) == 2:
        break
    L.sort()
    print(*L)

Submission status: Accepted

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

Submission status: Accepted

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