import std.stdio;
import std.array;
import std.conv;

void main()
{
  while (1) {
    string[] str = split(readln());
    int a = to!(int)(str[0]);
    int b = to!(int)(str[1]);

    if (a == 0 && b == 0) {
      break;
    } else if (a > b) {
      writeln(b, " ", a);
    } else {
      writeln(a, " ", b);
    }
  }
}