import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String str = br.readLine();
			String strArray[] = str.split(" ", 0);
			int num1 = Integer.parseInt(strArray[0]);
			int num2 = Integer.parseInt(strArray[1]);

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

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String str = br.readLine();
			String strArray[] = str.split(" ", 0);
			int num1 = Integer.parseInt(strArray[0]);
			int num2 = Integer.parseInt(strArray[1]);

			if(num1 == 0 && num2 ==0){
				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) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String str = br.readLine();
			String strArray[] = str.split(" ", 0);
			int num1 = Integer.parseInt(strArray[0]);
			int num2 = Integer.parseInt(strArray[1]);

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String str = br.readLine();
			String strArray[] = str.split(" ", 0);
			int num1 = Integer.parseInt(strArray[0]);
			int num2 = Integer.parseInt(strArray[1]);

			if(num1 == 0 && num2 ==0){
				break;
			}
			else{
				if(num1 <= num2){
					System.out.println(num1 + " " + num2);
				}
				else if(num2 < num1){
					System.out.println(num2 + " " + num1);
				}
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
			String str = br.readLine();
			String strArray[] = str.split(" ", 0);
			int num1 = Integer.parseInt(strArray[0]);
			int num2 = Integer.parseInt(strArray[1]);

			if(num1 == 0 && num2 ==0){
				break;
			}
			else{
				if(num1 <= num2){
					System.out.println(num1 + " " + num2);
				}
				else if(num2 < num1){
					System.out.println(num2 + " " + num1);
				}
			}
		} true {
			String str = br.readLine();
			String strArray[] = str.split(" ", 0);
			int num1 = Integer.parseInt(strArray[0]);
			int num2 = Integer.parseInt(strArray[1]);

			if(num1 == 0 && num2 ==0){
				break;
			}
			else{
				if(num1 <= num2){
					System.out.println(num1 + " " + num2);
				}
				else if(num2 < num1){
					System.out.println(num2 + " " + num1);
				}
			}
		} String str = br.readLine(); str br.readLine() br.readLine br String strArray[] = str.split(" ", 0); strArray str.split(" ", 0) str.split str " " 0 int num1 = Integer.parseInt(strArray[0]); num1 Integer.parseInt(strArray[0]) Integer.parseInt Integer strArray[0] strArray 0 int num2 = Integer.parseInt(strArray[1]); num2 Integer.parseInt(strArray[1]) Integer.parseInt Integer strArray[1] strArray 1 if(num1 == 0 && num2 ==0){
				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 {
				break;
			} 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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String str = br.readLine();
			String strArray[] = str.split(" ", 0);
			int num1 = Integer.parseInt(strArray[0]);
			int num2 = Integer.parseInt(strArray[1]);

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

}