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

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

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