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

class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int times = 1;
		while(true) {
			String str = br.readLine();
			String[] s = str.split(" ");
			int[] n = new int[s.length];
			for (int i = 0; i < s.length; i++) {
				n[i] = Integer.parseInt(s[i]);
			}
			
			if (n[0] == 0 && n[1] == 0) {
				break;
			}
			System.out.println(Math.min(n[0], n[1]) + " " + Math.max(n[0], n[1]) );
			times++;
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int times = 1;
		while(true) {
			String str = br.readLine();
			String[] s = str.split(" ");
			int[] n = new int[s.length];
			for (int i = 0; i < s.length; i++) {
				n[i] = Integer.parseInt(s[i]);
			}
			
			if (n[0] == 0 && n[1] == 0) {
				break;
			}
			System.out.println(Math.min(n[0], n[1]) + " " + Math.max(n[0], n[1]) );
			times++;
		}
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int times = 1;
		while(true) {
			String str = br.readLine();
			String[] s = str.split(" ");
			int[] n = new int[s.length];
			for (int i = 0; i < s.length; i++) {
				n[i] = Integer.parseInt(s[i]);
			}
			
			if (n[0] == 0 && n[1] == 0) {
				break;
			}
			System.out.println(Math.min(n[0], n[1]) + " " + Math.max(n[0], n[1]) );
			times++;
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int times = 1;
		while(true) {
			String str = br.readLine();
			String[] s = str.split(" ");
			int[] n = new int[s.length];
			for (int i = 0; i < s.length; i++) {
				n[i] = Integer.parseInt(s[i]);
			}
			
			if (n[0] == 0 && n[1] == 0) {
				break;
			}
			System.out.println(Math.min(n[0], n[1]) + " " + Math.max(n[0], n[1]) );
			times++;
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int times = 1; times 1 while(true) {
			String str = br.readLine();
			String[] s = str.split(" ");
			int[] n = new int[s.length];
			for (int i = 0; i < s.length; i++) {
				n[i] = Integer.parseInt(s[i]);
			}
			
			if (n[0] == 0 && n[1] == 0) {
				break;
			}
			System.out.println(Math.min(n[0], n[1]) + " " + Math.max(n[0], n[1]) );
			times++;
		} true {
			String str = br.readLine();
			String[] s = str.split(" ");
			int[] n = new int[s.length];
			for (int i = 0; i < s.length; i++) {
				n[i] = Integer.parseInt(s[i]);
			}
			
			if (n[0] == 0 && n[1] == 0) {
				break;
			}
			System.out.println(Math.min(n[0], n[1]) + " " + Math.max(n[0], n[1]) );
			times++;
		} String str = br.readLine(); str br.readLine() br.readLine br String[] s = str.split(" "); s str.split(" ") str.split str " " int[] n = new int[s.length]; n new int[s.length] s.length s s.length for (int i = 0; i < s.length; i++) {
				n[i] = Integer.parseInt(s[i]);
			} int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
				n[i] = Integer.parseInt(s[i]);
			} {
				n[i] = Integer.parseInt(s[i]);
			} n[i] = Integer.parseInt(s[i]) n[i] n i Integer.parseInt(s[i]) Integer.parseInt Integer s[i] s i if (n[0] == 0 && n[1] == 0) {
				break;
			} n[0] == 0 && n[1] == 0 n[0] == 0 n[0] n 0 0 n[1] == 0 n[1] n 1 0 {
				break;
			} break; System.out.println(Math.min(n[0], n[1]) + " " + Math.max(n[0], n[1]) ) System.out.println System.out System System.out Math.min(n[0], n[1]) + " " + Math.max(n[0], n[1]) Math.min(n[0], n[1]) + " " + Math.max(n[0], n[1]) Math.min(n[0], n[1]) Math.min Math n[0] n 0 n[1] n 1 " " Math.max(n[0], n[1]) Math.max Math n[0] n 0 n[1] n 1 times++ times String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int times = 1;
		while(true) {
			String str = br.readLine();
			String[] s = str.split(" ");
			int[] n = new int[s.length];
			for (int i = 0; i < s.length; i++) {
				n[i] = Integer.parseInt(s[i]);
			}
			
			if (n[0] == 0 && n[1] == 0) {
				break;
			}
			System.out.println(Math.min(n[0], n[1]) + " " + Math.max(n[0], n[1]) );
			times++;
		}
	}
}