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

class Main {
	public static void main(String[] args) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			int x, y;
			do {
				String[] list = br.readLine().split(" ");
				x = Integer.parseInt(list[0]);
				y = Integer.parseInt(list[1]);
				if (x == 0 && y == 0) {
					break;
				} else {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				}
			} while (true);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} 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) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			int x, y;
			do {
				String[] list = br.readLine().split(" ");
				x = Integer.parseInt(list[0]);
				y = Integer.parseInt(list[1]);
				if (x == 0 && y == 0) {
					break;
				} else {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				}
			} while (true);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} Main public static void main(String[] args) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			int x, y;
			do {
				String[] list = br.readLine().split(" ");
				x = Integer.parseInt(list[0]);
				y = Integer.parseInt(list[1]);
				if (x == 0 && y == 0) {
					break;
				} else {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				}
			} while (true);
		} catch (IOException e) {
			e.printStackTrace();
		}
	} main {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			int x, y;
			do {
				String[] list = br.readLine().split(" ");
				x = Integer.parseInt(list[0]);
				y = Integer.parseInt(list[1]);
				if (x == 0 && y == 0) {
					break;
				} else {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				}
			} while (true);
		} catch (IOException e) {
			e.printStackTrace();
		}
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) try {
			int x, y;
			do {
				String[] list = br.readLine().split(" ");
				x = Integer.parseInt(list[0]);
				y = Integer.parseInt(list[1]);
				if (x == 0 && y == 0) {
					break;
				} else {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				}
			} while (true);
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			int x, y;
			do {
				String[] list = br.readLine().split(" ");
				x = Integer.parseInt(list[0]);
				y = Integer.parseInt(list[1]);
				if (x == 0 && y == 0) {
					break;
				} else {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				}
			} while (true);
		} int x x y; y do {
				String[] list = br.readLine().split(" ");
				x = Integer.parseInt(list[0]);
				y = Integer.parseInt(list[1]);
				if (x == 0 && y == 0) {
					break;
				} else {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				}
			} while (true); true {
				String[] list = br.readLine().split(" ");
				x = Integer.parseInt(list[0]);
				y = Integer.parseInt(list[1]);
				if (x == 0 && y == 0) {
					break;
				} else {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				}
			} String[] list = br.readLine().split(" "); list br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " x = Integer.parseInt(list[0]) x Integer.parseInt(list[0]) Integer.parseInt Integer list[0] list 0 y = Integer.parseInt(list[1]) y Integer.parseInt(list[1]) Integer.parseInt Integer list[1] list 1 if (x == 0 && y == 0) {
					break;
				} else {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
					break;
				} break; {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				} if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					} 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 {
						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
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {
	public static void main(String[] args) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			int x, y;
			do {
				String[] list = br.readLine().split(" ");
				x = Integer.parseInt(list[0]);
				y = Integer.parseInt(list[1]);
				if (x == 0 && y == 0) {
					break;
				} else {
					if (x > y) {
						System.out.println(y + " " + x);
					} else {
						System.out.println(x + " " + y);
					}
				}
			} while (true);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}