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

void main() {
    auto input = getStdin!(string[])();
    foreach (line; input) {
    	auto num = line.split(" ").to!(int[]).sort;
    	if (num[0] == 0 && num[1] == 0) break;
    	writefln("%d %d", num[0], num[1]);
    }
}

T getStdin(T)() {
    string[] cmd;
    string line;
    while ((line = chomp(stdin.readln())) != "") cmd ~= line;
    return to!(T)(cmd);
}