import std.functional,
       std.algorithm,
       std.container,
       std.typetuple,
       std.typecons,
       std.bigint,
       std.string,
       std.traits,
       std.array,
       std.range,
       std.stdio,
       std.conv,
       std.format;

void main()
{
foreach(i; 0..10000){
	auto ip = readln.split.to!(int[]);
	if(ip[0] == 0 && ip[1] == 0) break;
	else{
		ip.sort().array;
		writefln("%s %s", ip[0], ip[1]);
	} 
}
}
