import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int i = 1;
		while (i < 3001) {
			String line = sc.nextLine();
			String[] array = line.split(" ");
			int x = Integer.parseInt(array[0]);
			int y = Integer.parseInt(array[1]);
			if (x == 0 && y == 0) {
				break;
			} else if (x >= y) {
				System.out.println(y + " " + x);

			} else if (x < y) {
				System.out.println(x + " " + y);

			}
			i++;
		}

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int i = 1;
		while (i < 3001) {
			String line = sc.nextLine();
			String[] array = line.split(" ");
			int x = Integer.parseInt(array[0]);
			int y = Integer.parseInt(array[1]);
			if (x == 0 && y == 0) {
				break;
			} else if (x >= y) {
				System.out.println(y + " " + x);

			} else if (x < y) {
				System.out.println(x + " " + y);

			}
			i++;
		}

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int i = 1;
		while (i < 3001) {
			String line = sc.nextLine();
			String[] array = line.split(" ");
			int x = Integer.parseInt(array[0]);
			int y = Integer.parseInt(array[1]);
			if (x == 0 && y == 0) {
				break;
			} else if (x >= y) {
				System.out.println(y + " " + x);

			} else if (x < y) {
				System.out.println(x + " " + y);

			}
			i++;
		}

	} main {
		Scanner sc = new Scanner(System.in);

		int i = 1;
		while (i < 3001) {
			String line = sc.nextLine();
			String[] array = line.split(" ");
			int x = Integer.parseInt(array[0]);
			int y = Integer.parseInt(array[1]);
			if (x == 0 && y == 0) {
				break;
			} else if (x >= y) {
				System.out.println(y + " " + x);

			} else if (x < y) {
				System.out.println(x + " " + y);

			}
			i++;
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int i = 1; i 1 while (i < 3001) {
			String line = sc.nextLine();
			String[] array = line.split(" ");
			int x = Integer.parseInt(array[0]);
			int y = Integer.parseInt(array[1]);
			if (x == 0 && y == 0) {
				break;
			} else if (x >= y) {
				System.out.println(y + " " + x);

			} else if (x < y) {
				System.out.println(x + " " + y);

			}
			i++;
		} i < 3001 i 3001 {
			String line = sc.nextLine();
			String[] array = line.split(" ");
			int x = Integer.parseInt(array[0]);
			int y = Integer.parseInt(array[1]);
			if (x == 0 && y == 0) {
				break;
			} else if (x >= y) {
				System.out.println(y + " " + x);

			} else if (x < y) {
				System.out.println(x + " " + y);

			}
			i++;
		} String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] array = line.split(" "); array line.split(" ") line.split line " " int x = Integer.parseInt(array[0]); x Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 int y = Integer.parseInt(array[1]); y Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 if (x == 0 && y == 0) {
				break;
			} else if (x >= y) {
				System.out.println(y + " " + x);

			} else if (x < y) {
				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 if (x < y) {
				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 if (x < y) {
				System.out.println(x + " " + y);

			} 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 i++ i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int i = 1;
		while (i < 3001) {
			String line = sc.nextLine();
			String[] array = line.split(" ");
			int x = Integer.parseInt(array[0]);
			int y = Integer.parseInt(array[1]);
			if (x == 0 && y == 0) {
				break;
			} else if (x >= y) {
				System.out.println(y + " " + x);

			} else if (x < y) {
				System.out.println(x + " " + y);

			}
			i++;
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int i = 1;
		while (i < 3001) {
			String line = sc.nextLine();
			String[] array = line.split(" ");
			int x = Integer.parseInt(array[0]);
			int y = Integer.parseInt(array[1]);
			if (x == 0 && y == 0) {
				break;
			} else if (x >= y) {
				System.out.println(y + " " + x);

			} else if (x < y) {
				System.out.println(x + " " + y);

			}
			i++;
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int i = 1;
		while (i < 3001) {
			String line = sc.nextLine();
			String[] array = line.split(" ");
			int x = Integer.parseInt(array[0]);
			int y = Integer.parseInt(array[1]);
			if (x == 0 && y == 0) {
				break;
			} else if (x >= y) {
				System.out.println(y + " " + x);

			} else if (x < y) {
				System.out.println(x + " " + y);

			}
			i++;
		}

	}

}