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

void main()
{
    string s;
    while( (s=readln.strip) != "0 0") {
        string[] str = s.strip.split;
        auto n = map!(to!int)(str);
        if( n[0] > n[1]) writefln("%d %d",n[1],n[0]);
        else writefln("%d %d",n[0],n[1]);
    }
}