import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int N = 3000;
		int x = 0;
		int y = 0;
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 3000; i++) {
			x = scan.nextInt();
			y = scan.nextInt();
			if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break;
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		int N = 3000;
		int x = 0;
		int y = 0;
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 3000; i++) {
			x = scan.nextInt();
			y = scan.nextInt();
			if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break;
		}
	}

} Main public static void main(String[] args) {
		int N = 3000;
		int x = 0;
		int y = 0;
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 3000; i++) {
			x = scan.nextInt();
			y = scan.nextInt();
			if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break;
		}
	} main {
		int N = 3000;
		int x = 0;
		int y = 0;
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 3000; i++) {
			x = scan.nextInt();
			y = scan.nextInt();
			if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break;
		}
	} int N = 3000; N 3000 int x = 0; x 0 int y = 0; y 0 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) for (int i = 0; i < 3000; i++) {
			x = scan.nextInt();
			y = scan.nextInt();
			if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break;
		} int i = 0; int i = 0; i 0 i < 3000 i 3000 i++ i++ i {
			x = scan.nextInt();
			y = scan.nextInt();
			if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break;
		} {
			x = scan.nextInt();
			y = scan.nextInt();
			if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break;
		} x = scan.nextInt() x scan.nextInt() scan.nextInt scan y = scan.nextInt() y scan.nextInt() scan.nextInt scan if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break; x != 0 || y != 0 x != 0 x 0 y != 0 y 0 {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} 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 break; String[] args args public class Main {
	public static void main(String[] args) {
		int N = 3000;
		int x = 0;
		int y = 0;
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 3000; i++) {
			x = scan.nextInt();
			y = scan.nextInt();
			if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break;
		}
	}

} public class Main {
	public static void main(String[] args) {
		int N = 3000;
		int x = 0;
		int y = 0;
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 3000; i++) {
			x = scan.nextInt();
			y = scan.nextInt();
			if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break;
		}
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int N = 3000;
		int x = 0;
		int y = 0;
		Scanner scan = new Scanner(System.in);
		for (int i = 0; i < 3000; i++) {
			x = scan.nextInt();
			y = scan.nextInt();
			if (x != 0 || y != 0) {
				if (x < y) {
					System.out.println(x + " "+ y);
				} else {
					System.out.println(y + " " + x);
				}
			} else
				break;
		}
	}

}