import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] strs;
		int x;
		int y;
		int w;
		while(true){
			str = br.readLine();
			strs = str.split(" ");
			x = Integer.parseInt(strs[0]);
			y = Integer.parseInt(strs[1]);
			if(x == 0 && y == 0){
				break;
			}else if(x > y){
				w = y;
				y = x;
				x = w;
			}//if
			System.out.println(x + " " + y);
		}//while
	}
} import java.io.*; io.* java public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] strs;
		int x;
		int y;
		int w;
		while(true){
			str = br.readLine();
			strs = str.split(" ");
			x = Integer.parseInt(strs[0]);
			y = Integer.parseInt(strs[1]);
			if(x == 0 && y == 0){
				break;
			}else if(x > y){
				w = y;
				y = x;
				x = w;
			}//if
			System.out.println(x + " " + y);
		}//while
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] strs;
		int x;
		int y;
		int w;
		while(true){
			str = br.readLine();
			strs = str.split(" ");
			x = Integer.parseInt(strs[0]);
			y = Integer.parseInt(strs[1]);
			if(x == 0 && y == 0){
				break;
			}else if(x > y){
				w = y;
				y = x;
				x = w;
			}//if
			System.out.println(x + " " + y);
		}//while
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] strs;
		int x;
		int y;
		int w;
		while(true){
			str = br.readLine();
			strs = str.split(" ");
			x = Integer.parseInt(strs[0]);
			y = Integer.parseInt(strs[1]);
			if(x == 0 && y == 0){
				break;
			}else if(x > y){
				w = y;
				y = x;
				x = w;
			}//if
			System.out.println(x + " " + y);
		}//while
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str String[] strs; strs int x; x int y; y int w; w while(true){
			str = br.readLine();
			strs = str.split(" ");
			x = Integer.parseInt(strs[0]);
			y = Integer.parseInt(strs[1]);
			if(x == 0 && y == 0){
				break;
			}else if(x > y){
				w = y;
				y = x;
				x = w;
			}//if
			System.out.println(x + " " + y);
		}//while true {
			str = br.readLine();
			strs = str.split(" ");
			x = Integer.parseInt(strs[0]);
			y = Integer.parseInt(strs[1]);
			if(x == 0 && y == 0){
				break;
			}else if(x > y){
				w = y;
				y = x;
				x = w;
			}//if
			System.out.println(x + " " + y);
		} str = br.readLine() str br.readLine() br.readLine br strs = str.split(" ") strs str.split(" ") str.split str " " x = Integer.parseInt(strs[0]) x Integer.parseInt(strs[0]) Integer.parseInt Integer strs[0] strs 0 y = Integer.parseInt(strs[1]) y Integer.parseInt(strs[1]) Integer.parseInt Integer strs[1] strs 1 if(x == 0 && y == 0){
				break;
			}else if(x > y){
				w = y;
				y = x;
				x = w;
			}//if x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				break;
			} break; if(x > y){
				w = y;
				y = x;
				x = w;
			}//if x > y x y {
				w = y;
				y = x;
				x = w;
			} w = y w y y = x y x x = w x w 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 {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] strs;
		int x;
		int y;
		int w;
		while(true){
			str = br.readLine();
			strs = str.split(" ");
			x = Integer.parseInt(strs[0]);
			y = Integer.parseInt(strs[1]);
			if(x == 0 && y == 0){
				break;
			}else if(x > y){
				w = y;
				y = x;
				x = w;
			}//if
			System.out.println(x + " " + y);
		}//while
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] strs;
		int x;
		int y;
		int w;
		while(true){
			str = br.readLine();
			strs = str.split(" ");
			x = Integer.parseInt(strs[0]);
			y = Integer.parseInt(strs[1]);
			if(x == 0 && y == 0){
				break;
			}else if(x > y){
				w = y;
				y = x;
				x = w;
			}//if
			System.out.println(x + " " + y);
		}//while
	}
} Main
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] strs;
		int x;
		int y;
		int w;
		while(true){
			str = br.readLine();
			strs = str.split(" ");
			x = Integer.parseInt(strs[0]);
			y = Integer.parseInt(strs[1]);
			if(x == 0 && y == 0){
				break;
			}else if(x > y){
				w = y;
				y = x;
				x = w;
			}//if
			System.out.println(x + " " + y);
		}//while
	}
}