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

public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str;
			String[] arr;
			int i;
			int j;
			while((str = br.readLine()) !=  null){
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			}
			br.close();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}

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

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str;
			String[] arr;
			int i;
			int j;
			while((str = br.readLine()) !=  null){
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			}
			br.close();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}

	}
} Main public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str;
			String[] arr;
			int i;
			int j;
			while((str = br.readLine()) !=  null){
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			}
			br.close();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}

	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str;
			String[] arr;
			int i;
			int j;
			while((str = br.readLine()) !=  null){
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			}
			br.close();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
			String str;
			String[] arr;
			int i;
			int j;
			while((str = br.readLine()) !=  null){
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			}
			br.close();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		} IOException e {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			String str;
			String[] arr;
			int i;
			int j;
			while((str = br.readLine()) !=  null){
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			}
			br.close();
		} String str; str String[] arr; arr int i; i int j; j while((str = br.readLine()) !=  null){
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			} (str = br.readLine()) !=  null (str = br.readLine()) str br.readLine() br.readLine br null {
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			} arr = str.split(" ") arr str.split(" ") str.split str " " i = Integer.parseInt(arr[0]) i Integer.parseInt(arr[0]) Integer.parseInt Integer arr[0] arr 0 j = Integer.parseInt(arr[1]) j Integer.parseInt(arr[1]) Integer.parseInt Integer arr[1] arr 1 if(i == 0 && j == 0) {
					break;
				} i == 0 && j == 0 i == 0 i 0 j == 0 j 0 {
					break;
				} break; if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				} i <= j i j System.out.println(str) System.out.println System.out System System.out str {
					System.out.println(arr[1] + " " + arr[0]);
				} System.out.println(arr[1] + " " + arr[0]) System.out.println System.out System System.out arr[1] + " " + arr[0] arr[1] + " " + arr[0] arr[1] arr 1 " " arr[0] arr 0 br.close() br.close br String[] args args public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str;
			String[] arr;
			int i;
			int j;
			while((str = br.readLine()) !=  null){
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			}
			br.close();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}

	}
} public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str;
			String[] arr;
			int i;
			int j;
			while((str = br.readLine()) !=  null){
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			}
			br.close();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}

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

public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str;
			String[] arr;
			int i;
			int j;
			while((str = br.readLine()) !=  null){
				arr = str.split(" ");
				i = Integer.parseInt(arr[0]);
				j = Integer.parseInt(arr[1]);
				if(i == 0 && j == 0) {
					break;
				}
				
				if(i <= j) System.out.println(str);
				else {
					System.out.println(arr[1] + " " + arr[0]);
				}
			}
			br.close();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}

	}
}