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

class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader  br = new BufferedReader(is);
		while (true) {
			String[] strAry = br.readLine().split(" ");
			int a = Integer.parseInt(strAry[0]);
			int b = Integer.parseInt(strAry[1]);
			if (a == 0 && b == 0) {
				break;
			} else if (a < b) {
				System.out.println(a + " " + b);
			} else if (b < a) {
				System.out.println(b + " " + a);
			} else if (a == b) {
				System.out.println(a + " " + b);
			}
		}
	}
} import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader  br = new BufferedReader(is);
		while (true) {
			String[] strAry = br.readLine().split(" ");
			int a = Integer.parseInt(strAry[0]);
			int b = Integer.parseInt(strAry[1]);
			if (a == 0 && b == 0) {
				break;
			} else if (a < b) {
				System.out.println(a + " " + b);
			} else if (b < a) {
				System.out.println(b + " " + a);
			} else if (a == b) {
				System.out.println(a + " " + b);
			}
		}
	}
} Main public static void main(String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader  br = new BufferedReader(is);
		while (true) {
			String[] strAry = br.readLine().split(" ");
			int a = Integer.parseInt(strAry[0]);
			int b = Integer.parseInt(strAry[1]);
			if (a == 0 && b == 0) {
				break;
			} else if (a < b) {
				System.out.println(a + " " + b);
			} else if (b < a) {
				System.out.println(b + " " + a);
			} else if (a == b) {
				System.out.println(a + " " + b);
			}
		}
	} main {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader  br = new BufferedReader(is);
		while (true) {
			String[] strAry = br.readLine().split(" ");
			int a = Integer.parseInt(strAry[0]);
			int b = Integer.parseInt(strAry[1]);
			if (a == 0 && b == 0) {
				break;
			} else if (a < b) {
				System.out.println(a + " " + b);
			} else if (b < a) {
				System.out.println(b + " " + a);
			} else if (a == b) {
				System.out.println(a + " " + b);
			}
		}
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader  br = new BufferedReader(is); br new BufferedReader(is) while (true) {
			String[] strAry = br.readLine().split(" ");
			int a = Integer.parseInt(strAry[0]);
			int b = Integer.parseInt(strAry[1]);
			if (a == 0 && b == 0) {
				break;
			} else if (a < b) {
				System.out.println(a + " " + b);
			} else if (b < a) {
				System.out.println(b + " " + a);
			} else if (a == b) {
				System.out.println(a + " " + b);
			}
		} true {
			String[] strAry = br.readLine().split(" ");
			int a = Integer.parseInt(strAry[0]);
			int b = Integer.parseInt(strAry[1]);
			if (a == 0 && b == 0) {
				break;
			} else if (a < b) {
				System.out.println(a + " " + b);
			} else if (b < a) {
				System.out.println(b + " " + a);
			} else if (a == b) {
				System.out.println(a + " " + b);
			}
		} String[] strAry = br.readLine().split(" "); strAry br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(strAry[0]); a Integer.parseInt(strAry[0]) Integer.parseInt Integer strAry[0] strAry 0 int b = Integer.parseInt(strAry[1]); b Integer.parseInt(strAry[1]) Integer.parseInt Integer strAry[1] strAry 1 if (a == 0 && b == 0) {
				break;
			} else if (a < b) {
				System.out.println(a + " " + b);
			} else if (b < a) {
				System.out.println(b + " " + a);
			} else if (a == b) {
				System.out.println(a + " " + b);
			} a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {
				break;
			} break; if (a < b) {
				System.out.println(a + " " + b);
			} else if (b < a) {
				System.out.println(b + " " + a);
			} else if (a == b) {
				System.out.println(a + " " + b);
			} a < b a b {
				System.out.println(a + " " + b);
			} System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b if (b < a) {
				System.out.println(b + " " + a);
			} else if (a == b) {
				System.out.println(a + " " + b);
			} b < a b a {
				System.out.println(b + " " + a);
			} System.out.println(b + " " + a) System.out.println System.out System System.out b + " " + a b + " " + a b " " a if (a == b) {
				System.out.println(a + " " + b);
			} a == b a b {
				System.out.println(a + " " + b);
			} System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b String[] args args
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;

class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader  br = new BufferedReader(is);
		while (true) {
			String[] strAry = br.readLine().split(" ");
			int a = Integer.parseInt(strAry[0]);
			int b = Integer.parseInt(strAry[1]);
			if (a == 0 && b == 0) {
				break;
			} else if (a < b) {
				System.out.println(a + " " + b);
			} else if (b < a) {
				System.out.println(b + " " + a);
			} else if (a == b) {
				System.out.println(a + " " + b);
			}
		}
	}
}