import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws IOException {
				
		BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
		Scanner sc = new Scanner(input);
		
	    while(true){
	    	int a=sc.nextInt();
	    	int b=sc.nextInt();
	    	if(a==0&&b==0){sc.close();break;}
	    	else if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a);
	    	}
	    }
	     	
	} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws IOException {
				
		BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
		Scanner sc = new Scanner(input);
		
	    while(true){
	    	int a=sc.nextInt();
	    	int b=sc.nextInt();
	    	if(a==0&&b==0){sc.close();break;}
	    	else if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a);
	    	}
	    }
	     	
	} Main public static void main(String[] args) throws IOException {
				
		BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
		Scanner sc = new Scanner(input);
		
	    while(true){
	    	int a=sc.nextInt();
	    	int b=sc.nextInt();
	    	if(a==0&&b==0){sc.close();break;}
	    	else if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a);
	    	}
	    } main {
				
		BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
		Scanner sc = new Scanner(input);
		
	    while(true){
	    	int a=sc.nextInt();
	    	int b=sc.nextInt();
	    	if(a==0&&b==0){sc.close();break;}
	    	else if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a);
	    	}
	    } BufferedReader input=new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) Scanner sc = new Scanner(input); sc new Scanner(input) while(true){
	    	int a=sc.nextInt();
	    	int b=sc.nextInt();
	    	if(a==0&&b==0){sc.close();break;}
	    	else if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a);
	    	} true {
	    	int a=sc.nextInt();
	    	int b=sc.nextInt();
	    	if(a==0&&b==0){sc.close();break;}
	    	else if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a);
	    	} int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int b=sc.nextInt(); b sc.nextInt() sc.nextInt sc if(a==0&&b==0){sc.close();break;}
	    	else if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a); a==0&&b==0 a==0 a 0 b==0 b 0 {sc.close();break;} sc.close() sc.close sc break; if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a); a<b a b System.out.println(a+" "+b) System.out.println System.out System System.out a+" "+b a+" "+b a " " b System.out.println(b+" "+a) System.out.println System.out System System.out b+" "+a b+" "+a b " " a String[] args args public class Main {
	public static void main(String[] args) throws IOException {
				
		BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
		Scanner sc = new Scanner(input);
		
	    while(true){
	    	int a=sc.nextInt();
	    	int b=sc.nextInt();
	    	if(a==0&&b==0){sc.close();break;}
	    	else if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a);
	    	}
	    }
	     	
	} public class Main {
	public static void main(String[] args) throws IOException {
				
		BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
		Scanner sc = new Scanner(input);
		
	    while(true){
	    	int a=sc.nextInt();
	    	int b=sc.nextInt();
	    	if(a==0&&b==0){sc.close();break;}
	    	else if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a);
	    	}
	    }
	     	
	} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws IOException {
				
		BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
		Scanner sc = new Scanner(input);
		
	    while(true){
	    	int a=sc.nextInt();
	    	int b=sc.nextInt();
	    	if(a==0&&b==0){sc.close();break;}
	    	else if(a<b)System.out.println(a+" "+b);
	    	else System.out.println(b+" "+a);
	    	}
	    }
	     	
	}