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

class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	    		System.out.println(y+" "+x);
	        }else{
	        	System.out.println(x+" "+y);
	        }
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	    		System.out.println(y+" "+x);
	        }else{
	        	System.out.println(x+" "+y);
	        }
		}
	}
} Main public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	    		System.out.println(y+" "+x);
	        }else{
	        	System.out.println(x+" "+y);
	        }
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	    		System.out.println(y+" "+x);
	        }else{
	        	System.out.println(x+" "+y);
	        }
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	    		System.out.println(y+" "+x);
	        }else{
	        	System.out.println(x+" "+y);
	        }
		} true {
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	    		System.out.println(y+" "+x);
	        }else{
	        	System.out.println(x+" "+y);
	        }
		} String[] array = br.readLine().split(" "); array br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int x = Integer.parseInt(array[0]); x Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 int y = Integer.parseInt(array[1]); y Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	    		System.out.println(y+" "+x);
	        }else{
	        	System.out.println(x+" "+y);
	        } x==0&&y==0 x==0 x 0 y==0 y 0 {
	        	break;
	        } break; if(x>y){
	    		System.out.println(y+" "+x);
	        }else{
	        	System.out.println(x+" "+y);
	        } x>y x y {
	    		System.out.println(y+" "+x);
	        } System.out.println(y+" "+x) System.out.println System.out System System.out y+" "+x y+" "+x y " " x {
	        	System.out.println(x+" "+y);
	        } System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y String[] args args
import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	    		System.out.println(y+" "+x);
	        }else{
	        	System.out.println(x+" "+y);
	        }
		}
	}
}