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

void main() {
    foreach (i; 0 .. 3000) {
        int[] x = readln.chomp.split.to!(int[]);
        if (x[0] == 0 && x[1] == 0) break;
        writeln(min(x[0], x[1]), " ", max(x[0], x[1]));
    }
}
