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

public class Main {
	public static void main(String args[])  throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int x = 0;
		int y = 0;
		boolean end = false;

		while (!end) {
			String temp = br.readLine();
			String[] numbers = temp.split(" ");
			x = Integer.parseInt(numbers[0]);
			y = Integer.parseInt(numbers[1]);

			if (x == 0 && y == 0) {
				end = true;
			} else if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String args[])  throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int x = 0;
		int y = 0;
		boolean end = false;

		while (!end) {
			String temp = br.readLine();
			String[] numbers = temp.split(" ");
			x = Integer.parseInt(numbers[0]);
			y = Integer.parseInt(numbers[1]);

			if (x == 0 && y == 0) {
				end = true;
			} else if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			}
		}
	}
} Main public static void main(String args[])  throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int x = 0;
		int y = 0;
		boolean end = false;

		while (!end) {
			String temp = br.readLine();
			String[] numbers = temp.split(" ");
			x = Integer.parseInt(numbers[0]);
			y = Integer.parseInt(numbers[1]);

			if (x == 0 && y == 0) {
				end = true;
			} else if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			}
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int x = 0;
		int y = 0;
		boolean end = false;

		while (!end) {
			String temp = br.readLine();
			String[] numbers = temp.split(" ");
			x = Integer.parseInt(numbers[0]);
			y = Integer.parseInt(numbers[1]);

			if (x == 0 && y == 0) {
				end = true;
			} else if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int x = 0; x 0 int y = 0; y 0 boolean end = false; end false while (!end) {
			String temp = br.readLine();
			String[] numbers = temp.split(" ");
			x = Integer.parseInt(numbers[0]);
			y = Integer.parseInt(numbers[1]);

			if (x == 0 && y == 0) {
				end = true;
			} else if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			}
		} !end end {
			String temp = br.readLine();
			String[] numbers = temp.split(" ");
			x = Integer.parseInt(numbers[0]);
			y = Integer.parseInt(numbers[1]);

			if (x == 0 && y == 0) {
				end = true;
			} else if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			}
		} String temp = br.readLine(); temp br.readLine() br.readLine br String[] numbers = temp.split(" "); numbers temp.split(" ") temp.split temp " " x = Integer.parseInt(numbers[0]) x Integer.parseInt(numbers[0]) Integer.parseInt Integer numbers[0] numbers 0 y = Integer.parseInt(numbers[1]) y Integer.parseInt(numbers[1]) Integer.parseInt Integer numbers[1] numbers 1 if (x == 0 && y == 0) {
				end = true;
			} else if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				end = true;
			} end = true end true if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			} x >= y x y {
				System.out.println(y + " " + x);
			} System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			} x < y x y {
				System.out.println(x + " " + y);
			} 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 Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int x = 0;
		int y = 0;
		boolean end = false;

		while (!end) {
			String temp = br.readLine();
			String[] numbers = temp.split(" ");
			x = Integer.parseInt(numbers[0]);
			y = Integer.parseInt(numbers[1]);

			if (x == 0 && y == 0) {
				end = true;
			} else if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			}
		}
	}
} public class Main {
	public static void main(String args[])  throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int x = 0;
		int y = 0;
		boolean end = false;

		while (!end) {
			String temp = br.readLine();
			String[] numbers = temp.split(" ");
			x = Integer.parseInt(numbers[0]);
			y = Integer.parseInt(numbers[1]);

			if (x == 0 && y == 0) {
				end = true;
			} else if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			}
		}
	}
} Main

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

public class Main {
	public static void main(String args[])  throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int x = 0;
		int y = 0;
		boolean end = false;

		while (!end) {
			String temp = br.readLine();
			String[] numbers = temp.split(" ");
			x = Integer.parseInt(numbers[0]);
			y = Integer.parseInt(numbers[1]);

			if (x == 0 && y == 0) {
				end = true;
			} else if (x >= y) {
				System.out.println(y + " " + x);
			} else if (x < y) {
				System.out.println(x + " " + y);
			} else {
				// ???????????????????????????????????\???????????????
			}
		}
	}
}