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

public class Main {

	public static void main(String[] args) throws IOException {
		//キーボード入力メソッド
		Scanner sc = new Scanner(System.in);

		int x = 1;
		int y = 1;

		while(true) {
			x = sc.nextInt();
			y = sc.nextInt();

			//xが0のとき、終了
			if(x == 0 && y == 0) {
				break;
			}

			//処理　xとyを小大の順で並べる
			if(x > y) {
				System.out.println(y + " " + x);
			}else {
				System.out.println(x + " " + y);
			}

		}
	}

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

	public static void main(String[] args) throws IOException {
		//キーボード入力メソッド
		Scanner sc = new Scanner(System.in);

		int x = 1;
		int y = 1;

		while(true) {
			x = sc.nextInt();
			y = sc.nextInt();

			//xが0のとき、終了
			if(x == 0 && y == 0) {
				break;
			}

			//処理　xとyを小大の順で並べる
			if(x > y) {
				System.out.println(y + " " + x);
			}else {
				System.out.println(x + " " + y);
			}

		}
	}

} Main public static void main(String[] args) throws IOException {
		//キーボード入力メソッド
		Scanner sc = new Scanner(System.in);

		int x = 1;
		int y = 1;

		while(true) {
			x = sc.nextInt();
			y = sc.nextInt();

			//xが0のとき、終了
			if(x == 0 && y == 0) {
				break;
			}

			//処理　xとyを小大の順で並べる
			if(x > y) {
				System.out.println(y + " " + x);
			}else {
				System.out.println(x + " " + y);
			}

		}
	} main {
		//キーボード入力メソッド
		Scanner sc = new Scanner(System.in);

		int x = 1;
		int y = 1;

		while(true) {
			x = sc.nextInt();
			y = sc.nextInt();

			//xが0のとき、終了
			if(x == 0 && y == 0) {
				break;
			}

			//処理　xとyを小大の順で並べる
			if(x > y) {
				System.out.println(y + " " + x);
			}else {
				System.out.println(x + " " + y);
			}

		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = 1; x 1 int y = 1; y 1 while(true) {
			x = sc.nextInt();
			y = sc.nextInt();

			//xが0のとき、終了
			if(x == 0 && y == 0) {
				break;
			}

			//処理　xとyを小大の順で並べる
			if(x > y) {
				System.out.println(y + " " + x);
			}else {
				System.out.println(x + " " + y);
			}

		} true {
			x = sc.nextInt();
			y = sc.nextInt();

			//xが0のとき、終了
			if(x == 0 && y == 0) {
				break;
			}

			//処理　xとyを小大の順で並べる
			if(x > y) {
				System.out.println(y + " " + x);
			}else {
				System.out.println(x + " " + y);
			}

		} x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc if(x == 0 && y == 0) {
				break;
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				break;
			} break; if(x > y) {
				System.out.println(y + " " + x);
			}else {
				System.out.println(x + " " + y);
			} x > y x y {
				System.out.println(y + " " + x);
			} System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x {
				System.out.println(x + " " + y);
			} System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		//キーボード入力メソッド
		Scanner sc = new Scanner(System.in);

		int x = 1;
		int y = 1;

		while(true) {
			x = sc.nextInt();
			y = sc.nextInt();

			//xが0のとき、終了
			if(x == 0 && y == 0) {
				break;
			}

			//処理　xとyを小大の順で並べる
			if(x > y) {
				System.out.println(y + " " + x);
			}else {
				System.out.println(x + " " + y);
			}

		}
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		//キーボード入力メソッド
		Scanner sc = new Scanner(System.in);

		int x = 1;
		int y = 1;

		while(true) {
			x = sc.nextInt();
			y = sc.nextInt();

			//xが0のとき、終了
			if(x == 0 && y == 0) {
				break;
			}

			//処理　xとyを小大の順で並べる
			if(x > y) {
				System.out.println(y + " " + x);
			}else {
				System.out.println(x + " " + y);
			}

		}
	}

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

public class Main {

	public static void main(String[] args) throws IOException {
		//キーボード入力メソッド
		Scanner sc = new Scanner(System.in);

		int x = 1;
		int y = 1;

		while(true) {
			x = sc.nextInt();
			y = sc.nextInt();

			//xが0のとき、終了
			if(x == 0 && y == 0) {
				break;
			}

			//処理　xとyを小大の順で並べる
			if(x > y) {
				System.out.println(y + " " + x);
			}else {
				System.out.println(x + " " + y);
			}

		}
	}

}

