import std.stdio,std.string,std.conv,std.array,std.algorithm;
void main(){
	foreach(i;1..int.max){
		string[] a = readln().chomp().split();
		if( a[0]=="0" && a[1]=="0" ){	break;	}
		if( to!int(a[0]) < to!int(a[1]) ){
			writeln( a[0]," ",a[1] );
		}else{
			writeln( a[1]," ",a[0] );
		}

	}
}