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

void main()
{
    foreach(line; stdin.byLine)
    {
        auto nm = line.chomp.split.map!(to!int).array.sort;
        if(nm[0] == 0 && nm[1] == 0) return;
        writefln("%s %s", nm[0], nm[1]);
    }
}