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

void main() {
   while (true) {
   auto a = readln.split.map!(to!int);
   if (a[0] == 0 && a]1] == 0) break;
   if (a[0] < a[1]) writeln(a[0], " ", a[1]);
   else writeln(a[1], " ", a[0]);
   }
}