import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x, y;
		while (true) {
			x = scanner.nextInt();
			y = scanner.nextInt();
			if (x == 0 && y == 0)
				break;
			if (x < y)
				System.out.println(x + " " + y);
			else
				System.out.println(y + " " + x);
		}
		scanner.close();
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x, y;
		while (true) {
			x = scanner.nextInt();
			y = scanner.nextInt();
			if (x == 0 && y == 0)
				break;
			if (x < y)
				System.out.println(x + " " + y);
			else
				System.out.println(y + " " + x);
		}
		scanner.close();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x, y;
		while (true) {
			x = scanner.nextInt();
			y = scanner.nextInt();
			if (x == 0 && y == 0)
				break;
			if (x < y)
				System.out.println(x + " " + y);
			else
				System.out.println(y + " " + x);
		}
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		int x, y;
		while (true) {
			x = scanner.nextInt();
			y = scanner.nextInt();
			if (x == 0 && y == 0)
				break;
			if (x < y)
				System.out.println(x + " " + y);
			else
				System.out.println(y + " " + x);
		}
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int x x y; y while (true) {
			x = scanner.nextInt();
			y = scanner.nextInt();
			if (x == 0 && y == 0)
				break;
			if (x < y)
				System.out.println(x + " " + y);
			else
				System.out.println(y + " " + x);
		} true {
			x = scanner.nextInt();
			y = scanner.nextInt();
			if (x == 0 && y == 0)
				break;
			if (x < y)
				System.out.println(x + " " + y);
			else
				System.out.println(y + " " + x);
		} x = scanner.nextInt() x scanner.nextInt() scanner.nextInt scanner y = scanner.nextInt() y scanner.nextInt() scanner.nextInt scanner if (x == 0 && y == 0)
				break; x == 0 && y == 0 x == 0 x 0 y == 0 y 0 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 System.out System System.out x + " " + y x + " " + y x " " y System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x scanner.close() scanner.close scanner String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x, y;
		while (true) {
			x = scanner.nextInt();
			y = scanner.nextInt();
			if (x == 0 && y == 0)
				break;
			if (x < y)
				System.out.println(x + " " + y);
			else
				System.out.println(y + " " + x);
		}
		scanner.close();
	}
}