import std.stdio,std.conv,std.algorithm,std.array;

int[] 		raia()	{ return readln().split().map!(to!int).array; }		//read stdin as int[]

void main(){
	for(auto i =0; i< 10000;i++)
	{auto it = raia();
		if(it[0] == 0 && it[1] == 0){ return;}
		else if( it[0] > it[1]){
			writeln(it[1]," ",it[0]);
		}else{
			writeln(it[0]," ",it[1]);
		}
	}
}