import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		for(;;){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();

			if(num1 == 0 && num2 ==0){
				scan.close();
				break;
			}
			else{
				if(num1 <= num2){
					System.out.println(num1 + " " + num2);
				}
				else if(num2 < num1){
					System.out.println(num2 + " " + num1);
				}
			}
		}
	}

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

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		for(;;){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();

			if(num1 == 0 && num2 ==0){
				scan.close();
				break;
			}
			else{
				if(num1 <= num2){
					System.out.println(num1 + " " + num2);
				}
				else if(num2 < num1){
					System.out.println(num2 + " " + num1);
				}
			}
		}
	}

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

		Scanner scan = new Scanner(System.in);

		for(;;){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();

			if(num1 == 0 && num2 ==0){
				scan.close();
				break;
			}
			else{
				if(num1 <= num2){
					System.out.println(num1 + " " + num2);
				}
				else if(num2 < num1){
					System.out.println(num2 + " " + num1);
				}
			}
		}
	} main {

		Scanner scan = new Scanner(System.in);

		for(;;){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();

			if(num1 == 0 && num2 ==0){
				scan.close();
				break;
			}
			else{
				if(num1 <= num2){
					System.out.println(num1 + " " + num2);
				}
				else if(num2 < num1){
					System.out.println(num2 + " " + num1);
				}
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) for(;;){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();

			if(num1 == 0 && num2 ==0){
				scan.close();
				break;
			}
			else{
				if(num1 <= num2){
					System.out.println(num1 + " " + num2);
				}
				else if(num2 < num1){
					System.out.println(num2 + " " + num1);
				}
			}
		} ; {
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();

			if(num1 == 0 && num2 ==0){
				scan.close();
				break;
			}
			else{
				if(num1 <= num2){
					System.out.println(num1 + " " + num2);
				}
				else if(num2 < num1){
					System.out.println(num2 + " " + num1);
				}
			}
		} {
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();

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

class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		for(;;){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();

			if(num1 == 0 && num2 ==0){
				scan.close();
				break;
			}
			else{
				if(num1 <= num2){
					System.out.println(num1 + " " + num2);
				}
				else if(num2 < num1){
					System.out.println(num2 + " " + num1);
				}
			}
		}
	}

}