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

public class Main {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while (true) {
			String str = br.readLine();
			if ("0 0".equals(str)) {
				break;
			}
			String[] strS = str.split(" ");
			int[] n = new int[2];
			for (int i = 0; i < n.length; i++) {
				n[i] = Integer.parseInt(strS[i]);
			}
			if(n[0] > n[1]) {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			}
			sb.append(Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n");
		}
		System.out.print(sb);
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while (true) {
			String str = br.readLine();
			if ("0 0".equals(str)) {
				break;
			}
			String[] strS = str.split(" ");
			int[] n = new int[2];
			for (int i = 0; i < n.length; i++) {
				n[i] = Integer.parseInt(strS[i]);
			}
			if(n[0] > n[1]) {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			}
			sb.append(Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n");
		}
		System.out.print(sb);
	}

} Main public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while (true) {
			String str = br.readLine();
			if ("0 0".equals(str)) {
				break;
			}
			String[] strS = str.split(" ");
			int[] n = new int[2];
			for (int i = 0; i < n.length; i++) {
				n[i] = Integer.parseInt(strS[i]);
			}
			if(n[0] > n[1]) {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			}
			sb.append(Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n");
		}
		System.out.print(sb);
	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while (true) {
			String str = br.readLine();
			if ("0 0".equals(str)) {
				break;
			}
			String[] strS = str.split(" ");
			int[] n = new int[2];
			for (int i = 0; i < n.length; i++) {
				n[i] = Integer.parseInt(strS[i]);
			}
			if(n[0] > n[1]) {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			}
			sb.append(Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n");
		}
		System.out.print(sb);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() while (true) {
			String str = br.readLine();
			if ("0 0".equals(str)) {
				break;
			}
			String[] strS = str.split(" ");
			int[] n = new int[2];
			for (int i = 0; i < n.length; i++) {
				n[i] = Integer.parseInt(strS[i]);
			}
			if(n[0] > n[1]) {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			}
			sb.append(Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n");
		} true {
			String str = br.readLine();
			if ("0 0".equals(str)) {
				break;
			}
			String[] strS = str.split(" ");
			int[] n = new int[2];
			for (int i = 0; i < n.length; i++) {
				n[i] = Integer.parseInt(strS[i]);
			}
			if(n[0] > n[1]) {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			}
			sb.append(Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n");
		} String str = br.readLine(); str br.readLine() br.readLine br if ("0 0".equals(str)) {
				break;
			} "0 0".equals(str) "0 0".equals "0 0" str {
				break;
			} break; String[] strS = str.split(" "); strS str.split(" ") str.split str " " int[] n = new int[2]; n new int[2] 2 for (int i = 0; i < n.length; i++) {
				n[i] = Integer.parseInt(strS[i]);
			} int i = 0; int i = 0; i 0 i < n.length i n.length n n.length i++ i++ i {
				n[i] = Integer.parseInt(strS[i]);
			} {
				n[i] = Integer.parseInt(strS[i]);
			} n[i] = Integer.parseInt(strS[i]) n[i] n i Integer.parseInt(strS[i]) Integer.parseInt Integer strS[i] strS i if(n[0] > n[1]) {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			} n[0] > n[1] n[0] n 0 n[1] n 1 {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			} int temp = n[0]; temp n[0] n 0 n[0] = n[1] n[0] n 0 n[1] n 1 n[1] = temp n[1] n 1 temp sb.append(Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n") sb.append sb Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n" Integer.toString(n[1]) Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n" Integer.toString(n[0]) Integer.toString Integer n[0] n 0 " " Integer.toString(n[1]) Integer.toString Integer n[1] n 1 "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args public class Main {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while (true) {
			String str = br.readLine();
			if ("0 0".equals(str)) {
				break;
			}
			String[] strS = str.split(" ");
			int[] n = new int[2];
			for (int i = 0; i < n.length; i++) {
				n[i] = Integer.parseInt(strS[i]);
			}
			if(n[0] > n[1]) {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			}
			sb.append(Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n");
		}
		System.out.print(sb);
	}

} public class Main {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while (true) {
			String str = br.readLine();
			if ("0 0".equals(str)) {
				break;
			}
			String[] strS = str.split(" ");
			int[] n = new int[2];
			for (int i = 0; i < n.length; i++) {
				n[i] = Integer.parseInt(strS[i]);
			}
			if(n[0] > n[1]) {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			}
			sb.append(Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n");
		}
		System.out.print(sb);
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		while (true) {
			String str = br.readLine();
			if ("0 0".equals(str)) {
				break;
			}
			String[] strS = str.split(" ");
			int[] n = new int[2];
			for (int i = 0; i < n.length; i++) {
				n[i] = Integer.parseInt(strS[i]);
			}
			if(n[0] > n[1]) {
				int temp = n[0];
				n[0] = n[1];
				n[1] = temp;
			}
			sb.append(Integer.toString(n[0]) + " " + Integer.toString(n[1]) + "\n");
		}
		System.out.print(sb);
	}

}