import java.io.IOException;
import java.io.PrintStream;
import java.util.Scanner;

class Main{
	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		PrintStream out = System.out;

		int val1, val2;
		do {
			val1 = scan.nextInt();
			val2 = scan.nextInt();
			if (val1 > val2) {
				int temp = val1;
				val1 = val2;
				val2 = temp;
			}
			if (val1 == 0 && val2 == 0) {
				break;
			}
			out.println(val1 + " " + val2);
		} while (val1 != 0 || val2 != 0);
	}
} import java.io.IOException; IOException java.io import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		PrintStream out = System.out;

		int val1, val2;
		do {
			val1 = scan.nextInt();
			val2 = scan.nextInt();
			if (val1 > val2) {
				int temp = val1;
				val1 = val2;
				val2 = temp;
			}
			if (val1 == 0 && val2 == 0) {
				break;
			}
			out.println(val1 + " " + val2);
		} while (val1 != 0 || val2 != 0);
	}
} Main public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		PrintStream out = System.out;

		int val1, val2;
		do {
			val1 = scan.nextInt();
			val2 = scan.nextInt();
			if (val1 > val2) {
				int temp = val1;
				val1 = val2;
				val2 = temp;
			}
			if (val1 == 0 && val2 == 0) {
				break;
			}
			out.println(val1 + " " + val2);
		} while (val1 != 0 || val2 != 0);
	} main {
		Scanner scan = new Scanner(System.in);
		PrintStream out = System.out;

		int val1, val2;
		do {
			val1 = scan.nextInt();
			val2 = scan.nextInt();
			if (val1 > val2) {
				int temp = val1;
				val1 = val2;
				val2 = temp;
			}
			if (val1 == 0 && val2 == 0) {
				break;
			}
			out.println(val1 + " " + val2);
		} while (val1 != 0 || val2 != 0);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) PrintStream out = System.out; out System.out System System.out int val1 val1 val2; val2 do {
			val1 = scan.nextInt();
			val2 = scan.nextInt();
			if (val1 > val2) {
				int temp = val1;
				val1 = val2;
				val2 = temp;
			}
			if (val1 == 0 && val2 == 0) {
				break;
			}
			out.println(val1 + " " + val2);
		} while (val1 != 0 || val2 != 0); val1 != 0 || val2 != 0 val1 != 0 val1 0 val2 != 0 val2 0 {
			val1 = scan.nextInt();
			val2 = scan.nextInt();
			if (val1 > val2) {
				int temp = val1;
				val1 = val2;
				val2 = temp;
			}
			if (val1 == 0 && val2 == 0) {
				break;
			}
			out.println(val1 + " " + val2);
		} val1 = scan.nextInt() val1 scan.nextInt() scan.nextInt scan val2 = scan.nextInt() val2 scan.nextInt() scan.nextInt scan if (val1 > val2) {
				int temp = val1;
				val1 = val2;
				val2 = temp;
			} val1 > val2 val1 val2 {
				int temp = val1;
				val1 = val2;
				val2 = temp;
			} int temp = val1; temp val1 val1 = val2 val1 val2 val2 = temp val2 temp if (val1 == 0 && val2 == 0) {
				break;
			} val1 == 0 && val2 == 0 val1 == 0 val1 0 val2 == 0 val2 0 {
				break;
			} break; out.println(val1 + " " + val2) out.println out val1 + " " + val2 val1 + " " + val2 val1 " " val2 String[] args args
import java.io.IOException;
import java.io.PrintStream;
import java.util.Scanner;

class Main{
	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		PrintStream out = System.out;

		int val1, val2;
		do {
			val1 = scan.nextInt();
			val2 = scan.nextInt();
			if (val1 > val2) {
				int temp = val1;
				val1 = val2;
				val2 = temp;
			}
			if (val1 == 0 && val2 == 0) {
				break;
			}
			out.println(val1 + " " + val2);
		} while (val1 != 0 || val2 != 0);
	}
}