import java.io.*;

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

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