import java.io.IOException;
import java.util.Scanner;

class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);

		int num1 = 1, num2 = 1;


		while (true) {

			num1 = scan.nextInt();
			num2 = scan.nextInt();

			if((num1 ==0) && (num2 ==0)){
				break;
			}


			if(num1 > num2){
				System.out.println(num2+" "+num1);
			}else {
				System.out.println(num1+" "+num2);
			}
		}

	}

} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);

		int num1 = 1, num2 = 1;


		while (true) {

			num1 = scan.nextInt();
			num2 = scan.nextInt();

			if((num1 ==0) && (num2 ==0)){
				break;
			}


			if(num1 > num2){
				System.out.println(num2+" "+num1);
			}else {
				System.out.println(num1+" "+num2);
			}
		}

	}

} Main public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);

		int num1 = 1, num2 = 1;


		while (true) {

			num1 = scan.nextInt();
			num2 = scan.nextInt();

			if((num1 ==0) && (num2 ==0)){
				break;
			}


			if(num1 > num2){
				System.out.println(num2+" "+num1);
			}else {
				System.out.println(num1+" "+num2);
			}
		}

	} main {

		Scanner scan = new Scanner(System.in);

		int num1 = 1, num2 = 1;


		while (true) {

			num1 = scan.nextInt();
			num2 = scan.nextInt();

			if((num1 ==0) && (num2 ==0)){
				break;
			}


			if(num1 > num2){
				System.out.println(num2+" "+num1);
			}else {
				System.out.println(num1+" "+num2);
			}
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int num1 = 1 num1 1 num2 = 1; num2 1 while (true) {

			num1 = scan.nextInt();
			num2 = scan.nextInt();

			if((num1 ==0) && (num2 ==0)){
				break;
			}


			if(num1 > num2){
				System.out.println(num2+" "+num1);
			}else {
				System.out.println(num1+" "+num2);
			}
		} true {

			num1 = scan.nextInt();
			num2 = scan.nextInt();

			if((num1 ==0) && (num2 ==0)){
				break;
			}


			if(num1 > num2){
				System.out.println(num2+" "+num1);
			}else {
				System.out.println(num1+" "+num2);
			}
		} num1 = scan.nextInt() num1 scan.nextInt() scan.nextInt scan num2 = scan.nextInt() num2 scan.nextInt() scan.nextInt scan if((num1 ==0) && (num2 ==0)){
				break;
			} (num1 ==0) && (num2 ==0) (num1 ==0) num1 0 (num2 ==0) num2 0 {
				break;
			} break; if(num1 > num2){
				System.out.println(num2+" "+num1);
			}else {
				System.out.println(num1+" "+num2);
			} num1 > num2 num1 num2 {
				System.out.println(num2+" "+num1);
			} System.out.println(num2+" "+num1) System.out.println System.out System System.out num2+" "+num1 num2+" "+num1 num2 " " num1 {
				System.out.println(num1+" "+num2);
			} System.out.println(num1+" "+num2) System.out.println System.out System System.out num1+" "+num2 num1+" "+num2 num1 " " num2 String[] args args
import java.io.IOException;
import java.util.Scanner;

class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);

		int num1 = 1, num2 = 1;


		while (true) {

			num1 = scan.nextInt();
			num2 = scan.nextInt();

			if((num1 ==0) && (num2 ==0)){
				break;
			}


			if(num1 > num2){
				System.out.println(num2+" "+num1);
			}else {
				System.out.println(num1+" "+num2);
			}
		}

	}

}