import java.io.*;
import java.util.Arrays;
class Main{
	public static void main(String[] args) throws IOException {
		int i;
		int[] n = new int[5];
		String[] str = new String[5];
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for(;;){
			str = in.readLine().split(" ");
			for(i=0;i<2;i++){
				n[i]=Integer.parseInt(str[i]);
			}
			if(n[0]==0 && n[1]==0) break;
			System.out.println((n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1]));
		}
	}
} import java.io.*; io.* java import java.util.Arrays; Arrays java.util class Main{
	public static void main(String[] args) throws IOException {
		int i;
		int[] n = new int[5];
		String[] str = new String[5];
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for(;;){
			str = in.readLine().split(" ");
			for(i=0;i<2;i++){
				n[i]=Integer.parseInt(str[i]);
			}
			if(n[0]==0 && n[1]==0) break;
			System.out.println((n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1]));
		}
	}
} Main public static void main(String[] args) throws IOException {
		int i;
		int[] n = new int[5];
		String[] str = new String[5];
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for(;;){
			str = in.readLine().split(" ");
			for(i=0;i<2;i++){
				n[i]=Integer.parseInt(str[i]);
			}
			if(n[0]==0 && n[1]==0) break;
			System.out.println((n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1]));
		}
	} main {
		int i;
		int[] n = new int[5];
		String[] str = new String[5];
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for(;;){
			str = in.readLine().split(" ");
			for(i=0;i<2;i++){
				n[i]=Integer.parseInt(str[i]);
			}
			if(n[0]==0 && n[1]==0) break;
			System.out.println((n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1]));
		}
	} int i; i int[] n = new int[5]; n new int[5] 5 String[] str = new String[5]; str new String[5] 5 BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) for(;;){
			str = in.readLine().split(" ");
			for(i=0;i<2;i++){
				n[i]=Integer.parseInt(str[i]);
			}
			if(n[0]==0 && n[1]==0) break;
			System.out.println((n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1]));
		} ; {
			str = in.readLine().split(" ");
			for(i=0;i<2;i++){
				n[i]=Integer.parseInt(str[i]);
			}
			if(n[0]==0 && n[1]==0) break;
			System.out.println((n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1]));
		} {
			str = in.readLine().split(" ");
			for(i=0;i<2;i++){
				n[i]=Integer.parseInt(str[i]);
			}
			if(n[0]==0 && n[1]==0) break;
			System.out.println((n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1]));
		} str = in.readLine().split(" ") str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " for(i=0;i<2;i++){
				n[i]=Integer.parseInt(str[i]);
			} i=0; i=0 i 0 i<2 i 2 i++ i++ i {
				n[i]=Integer.parseInt(str[i]);
			} {
				n[i]=Integer.parseInt(str[i]);
			} n[i]=Integer.parseInt(str[i]) n[i] n i Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str 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; System.out.println((n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1])) System.out.println System.out System System.out (n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1]) (n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1]) (n[0]>n[1]?n[1]:n[0]) n[0]>n[1] n[0] n 0 n[1] n 1 n[1] n 1 n[0] n 0 " " (n[0]>n[1]?n[0]:n[1]) n[0]>n[1] n[0] n 0 n[1] n 1 n[0] n 0 n[1] n 1 String[] args args
import java.io.*;
import java.util.Arrays;
class Main{
	public static void main(String[] args) throws IOException {
		int i;
		int[] n = new int[5];
		String[] str = new String[5];
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		for(;;){
			str = in.readLine().split(" ");
			for(i=0;i<2;i++){
				n[i]=Integer.parseInt(str[i]);
			}
			if(n[0]==0 && n[1]==0) break;
			System.out.println((n[0]>n[1]?n[1]:n[0])+" "+(n[0]>n[1]?n[0]:n[1]));
		}
	}
}