import std.algorithm, std.array, std.container, std.range, std.bitmanip;
import std.numeric, std.math, std.bigint, std.random, core.bitop;
import std.string, std.conv, std.stdio, std.typecons;

void main()
{
  while (true) {
    auto rd = readln.split.map!(to!int);
    auto x = rd[0], y = rd[1];
    if (x == 0 && y == 0) break;
    if (x > y) swap(x, y);
    writeln(x, " ", y);
  }
}