import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while (true) {
			String[] strArr = br.readLine().split(" ");
			long[] arr = new long[2];
			arr[0] = Long.parseLong(strArr[0]);
			arr[1] = Long.parseLong(strArr[1]);
			if(arr[0] == 0 && arr[1] == 0)break;
			Arrays.sort(arr);
			System.out.printf("%d %d%n", arr[0], arr[1]);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while (true) {
			String[] strArr = br.readLine().split(" ");
			long[] arr = new long[2];
			arr[0] = Long.parseLong(strArr[0]);
			arr[1] = Long.parseLong(strArr[1]);
			if(arr[0] == 0 && arr[1] == 0)break;
			Arrays.sort(arr);
			System.out.printf("%d %d%n", arr[0], arr[1]);
		}
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while (true) {
			String[] strArr = br.readLine().split(" ");
			long[] arr = new long[2];
			arr[0] = Long.parseLong(strArr[0]);
			arr[1] = Long.parseLong(strArr[1]);
			if(arr[0] == 0 && arr[1] == 0)break;
			Arrays.sort(arr);
			System.out.printf("%d %d%n", arr[0], arr[1]);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while (true) {
			String[] strArr = br.readLine().split(" ");
			long[] arr = new long[2];
			arr[0] = Long.parseLong(strArr[0]);
			arr[1] = Long.parseLong(strArr[1]);
			if(arr[0] == 0 && arr[1] == 0)break;
			Arrays.sort(arr);
			System.out.printf("%d %d%n", arr[0], arr[1]);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while (true) {
			String[] strArr = br.readLine().split(" ");
			long[] arr = new long[2];
			arr[0] = Long.parseLong(strArr[0]);
			arr[1] = Long.parseLong(strArr[1]);
			if(arr[0] == 0 && arr[1] == 0)break;
			Arrays.sort(arr);
			System.out.printf("%d %d%n", arr[0], arr[1]);
		} true {
			String[] strArr = br.readLine().split(" ");
			long[] arr = new long[2];
			arr[0] = Long.parseLong(strArr[0]);
			arr[1] = Long.parseLong(strArr[1]);
			if(arr[0] == 0 && arr[1] == 0)break;
			Arrays.sort(arr);
			System.out.printf("%d %d%n", arr[0], arr[1]);
		} String[] strArr = br.readLine().split(" "); strArr br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " long[] arr = new long[2]; arr new long[2] 2 arr[0] = Long.parseLong(strArr[0]) arr[0] arr 0 Long.parseLong(strArr[0]) Long.parseLong Long strArr[0] strArr 0 arr[1] = Long.parseLong(strArr[1]) arr[1] arr 1 Long.parseLong(strArr[1]) Long.parseLong Long strArr[1] strArr 1 if(arr[0] == 0 && arr[1] == 0)break; arr[0] == 0 && arr[1] == 0 arr[0] == 0 arr[0] arr 0 0 arr[1] == 0 arr[1] arr 1 0 break; Arrays.sort(arr) Arrays.sort Arrays arr System.out.printf("%d %d%n", arr[0], arr[1]) System.out.printf System.out System System.out "%d %d%n" arr[0] arr 0 arr[1] arr 1 String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while (true) {
			String[] strArr = br.readLine().split(" ");
			long[] arr = new long[2];
			arr[0] = Long.parseLong(strArr[0]);
			arr[1] = Long.parseLong(strArr[1]);
			if(arr[0] == 0 && arr[1] == 0)break;
			Arrays.sort(arr);
			System.out.printf("%d %d%n", arr[0], arr[1]);
		}
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while (true) {
			String[] strArr = br.readLine().split(" ");
			long[] arr = new long[2];
			arr[0] = Long.parseLong(strArr[0]);
			arr[1] = Long.parseLong(strArr[1]);
			if(arr[0] == 0 && arr[1] == 0)break;
			Arrays.sort(arr);
			System.out.printf("%d %d%n", arr[0], arr[1]);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while (true) {
			String[] strArr = br.readLine().split(" ");
			long[] arr = new long[2];
			arr[0] = Long.parseLong(strArr[0]);
			arr[1] = Long.parseLong(strArr[1]);
			if(arr[0] == 0 && arr[1] == 0)break;
			Arrays.sort(arr);
			System.out.printf("%d %d%n", arr[0], arr[1]);
		}
	}
}