import java.util.Scanner;

public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if (x == 0 && y == 0) break;
			if (x < y) {
				System.out.printf("%d %d\n", x, y);
			} else System.out.printf("%d %d\n", y, x);
		}
	}
	public static void main(String[] args) {
		new Main().run();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if (x == 0 && y == 0) break;
			if (x < y) {
				System.out.printf("%d %d\n", x, y);
			} else System.out.printf("%d %d\n", y, x);
		}
	}
	public static void main(String[] args) {
		new Main().run();
	}
} Main void run() {
		Scanner scan = new Scanner(System.in);
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if (x == 0 && y == 0) break;
			if (x < y) {
				System.out.printf("%d %d\n", x, y);
			} else System.out.printf("%d %d\n", y, x);
		}
	} run {
		Scanner scan = new Scanner(System.in);
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if (x == 0 && y == 0) break;
			if (x < y) {
				System.out.printf("%d %d\n", x, y);
			} else System.out.printf("%d %d\n", y, x);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if (x == 0 && y == 0) break;
			if (x < y) {
				System.out.printf("%d %d\n", x, y);
			} else System.out.printf("%d %d\n", y, x);
		} true {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if (x == 0 && y == 0) break;
			if (x < y) {
				System.out.printf("%d %d\n", x, y);
			} else System.out.printf("%d %d\n", y, x);
		} int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan if (x == 0 && y == 0) break; x == 0 && y == 0 x == 0 x 0 y == 0 y 0 break; if (x < y) {
				System.out.printf("%d %d\n", x, y);
			} else System.out.printf("%d %d\n", y, x); x < y x y {
				System.out.printf("%d %d\n", x, y);
			} System.out.printf("%d %d\n", x, y) System.out.printf System.out System System.out "%d %d\n" x y System.out.printf("%d %d\n", y, x) System.out.printf System.out System System.out "%d %d\n" y x public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if (x == 0 && y == 0) break;
			if (x < y) {
				System.out.printf("%d %d\n", x, y);
			} else System.out.printf("%d %d\n", y, x);
		}
	}
	public static void main(String[] args) {
		new Main().run();
	}
} public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if (x == 0 && y == 0) break;
			if (x < y) {
				System.out.printf("%d %d\n", x, y);
			} else System.out.printf("%d %d\n", y, x);
		}
	}
	public static void main(String[] args) {
		new Main().run();
	}
} Main
import java.util.Scanner;

public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		while (true) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if (x == 0 && y == 0) break;
			if (x < y) {
				System.out.printf("%d %d\n", x, y);
			} else System.out.printf("%d %d\n", y, x);
		}
	}
	public static void main(String[] args) {
		new Main().run();
	}
}