import java.util.Scanner;
class Main {
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		for (int num = 1;; num++ ){
			int numx = scanner.nextInt();
			int numy = scanner.nextInt();
			
			if(numx == 0 && numy == 0){
				break;
			}		    
				else if(numx < numy){
					System.out.println(numx+" "+numy);
				}
				else {
					System.out.println(numy+" "+numx);
				}
	    	}
	}	

} import java.util.Scanner; Scanner java.util class Main {
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		for (int num = 1;; num++ ){
			int numx = scanner.nextInt();
			int numy = scanner.nextInt();
			
			if(numx == 0 && numy == 0){
				break;
			}		    
				else if(numx < numy){
					System.out.println(numx+" "+numy);
				}
				else {
					System.out.println(numy+" "+numx);
				}
	    	}
	}	

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		for (int num = 1;; num++ ){
			int numx = scanner.nextInt();
			int numy = scanner.nextInt();
			
			if(numx == 0 && numy == 0){
				break;
			}		    
				else if(numx < numy){
					System.out.println(numx+" "+numy);
				}
				else {
					System.out.println(numy+" "+numx);
				}
	    	}
	} main {
		Scanner scanner = new Scanner(System.in);
		
		for (int num = 1;; num++ ){
			int numx = scanner.nextInt();
			int numy = scanner.nextInt();
			
			if(numx == 0 && numy == 0){
				break;
			}		    
				else if(numx < numy){
					System.out.println(numx+" "+numy);
				}
				else {
					System.out.println(numy+" "+numx);
				}
	    	}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) for (int num = 1;; num++ ){
			int numx = scanner.nextInt();
			int numy = scanner.nextInt();
			
			if(numx == 0 && numy == 0){
				break;
			}		    
				else if(numx < numy){
					System.out.println(numx+" "+numy);
				}
				else {
					System.out.println(numy+" "+numx);
				}
	    	} int num = 1; int num = 1; num 1 num++ num++ num {
			int numx = scanner.nextInt();
			int numy = scanner.nextInt();
			
			if(numx == 0 && numy == 0){
				break;
			}		    
				else if(numx < numy){
					System.out.println(numx+" "+numy);
				}
				else {
					System.out.println(numy+" "+numx);
				}
	    	} {
			int numx = scanner.nextInt();
			int numy = scanner.nextInt();
			
			if(numx == 0 && numy == 0){
				break;
			}		    
				else if(numx < numy){
					System.out.println(numx+" "+numy);
				}
				else {
					System.out.println(numy+" "+numx);
				}
	    	} int numx = scanner.nextInt(); numx scanner.nextInt() scanner.nextInt scanner int numy = scanner.nextInt(); numy scanner.nextInt() scanner.nextInt scanner if(numx == 0 && numy == 0){
				break;
			}		    
				else if(numx < numy){
					System.out.println(numx+" "+numy);
				}
				else {
					System.out.println(numy+" "+numx);
				} numx == 0 && numy == 0 numx == 0 numx 0 numy == 0 numy 0 {
				break;
			} break; if(numx < numy){
					System.out.println(numx+" "+numy);
				}
				else {
					System.out.println(numy+" "+numx);
				} numx < numy numx numy {
					System.out.println(numx+" "+numy);
				} System.out.println(numx+" "+numy) System.out.println System.out System System.out numx+" "+numy numx+" "+numy numx " " numy {
					System.out.println(numy+" "+numx);
				} System.out.println(numy+" "+numx) System.out.println System.out System System.out numy+" "+numx numy+" "+numx numy " " numx String[] args args
import java.util.Scanner;
class Main {
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		for (int num = 1;; num++ ){
			int numx = scanner.nextInt();
			int numy = scanner.nextInt();
			
			if(numx == 0 && numy == 0){
				break;
			}		    
				else if(numx < numy){
					System.out.println(numx+" "+numy);
				}
				else {
					System.out.println(numy+" "+numx);
				}
	    	}
	}	

}