"use strict"
let input=require('fs').readFileSync('/dev/stdin','utf8');
let arr=input.split('\n');
for(let i in arr){
	let list=arr[i].split(' ');
	let a=parseInt(list[0]);
	let b=parseInt(list[1]);
	if(a===0&&b===0)break;
	if(a<=b) console.log(a+' '+b);
	else console.log(b+' '+a);
}

