import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i = 0;
		while (i < 3000) {
			int x = scan.nextInt();
			int y = scan.nextInt();

			if (0 <= x && x <= 10000 && 0 <= y && y <= 10000) {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			i++;
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i = 0;
		while (i < 3000) {
			int x = scan.nextInt();
			int y = scan.nextInt();

			if (0 <= x && x <= 10000 && 0 <= y && y <= 10000) {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			i++;
		}

	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i = 0;
		while (i < 3000) {
			int x = scan.nextInt();
			int y = scan.nextInt();

			if (0 <= x && x <= 10000 && 0 <= y && y <= 10000) {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			i++;
		}

	} main {
		Scanner scan = new Scanner(System.in);
		int i = 0;
		while (i < 3000) {
			int x = scan.nextInt();
			int y = scan.nextInt();

			if (0 <= x && x <= 10000 && 0 <= y && y <= 10000) {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			i++;
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int i = 0; i 0 while (i < 3000) {
			int x = scan.nextInt();
			int y = scan.nextInt();

			if (0 <= x && x <= 10000 && 0 <= y && y <= 10000) {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			i++;
		} i < 3000 i 3000 {
			int x = scan.nextInt();
			int y = scan.nextInt();

			if (0 <= x && x <= 10000 && 0 <= y && y <= 10000) {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			i++;
		} int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan if (0 <= x && x <= 10000 && 0 <= y && y <= 10000) {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			} 0 <= x && x <= 10000 && 0 <= y && y <= 10000 0 <= y 0 <= x && x <= 10000 && 0 <= y && y <= 10000 0 <= x 0 x x <= 10000 x 10000 0 <= y 0 y y <= 10000 y 10000 {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			} if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				} 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 i++ i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i = 0;
		while (i < 3000) {
			int x = scan.nextInt();
			int y = scan.nextInt();

			if (0 <= x && x <= 10000 && 0 <= y && y <= 10000) {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			i++;
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i = 0;
		while (i < 3000) {
			int x = scan.nextInt();
			int y = scan.nextInt();

			if (0 <= x && x <= 10000 && 0 <= y && y <= 10000) {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			i++;
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i = 0;
		while (i < 3000) {
			int x = scan.nextInt();
			int y = scan.nextInt();

			if (0 <= x && x <= 10000 && 0 <= y && y <= 10000) {
				if (x == 0 && y == 0) {
					break;
				} else if (x <= y) {
					System.out.println(x + " " + y);
				} else {
					System.out.println(y + " " + x);
				}
			}
			i++;
		}

	}

}