#include <iostream>
using namespace std;

void output(int a, int b){
	cout << a << " " << b << "\n";
}
int main(int argc, char *argv[]){
	int a,b;
	while(1){
		cin >> a >> b;
		if (a == 0 && b == 0) break;
		if (a < b) {
			output(a,b);
		} else {
			output(b,a);
		}
	}
}

