import java.io.*;
import java.util.*;

class Main{
    public static void main(String args[]){
                
        BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
        for(int i=0;i<3000;i++){
            try{
                String s=reader.readLine();
                StringTokenizer st = new StringTokenizer(s);
                
                String x=st.nextToken();
                String y=st.nextToken();
                
                int xn=Integer.parseInt(x);
                int yn=Integer.parseInt(y);
                
                if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                }
                
                
            }catch(IOException e){
                
            }

        }
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main{
    public static void main(String args[]){
                
        BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
        for(int i=0;i<3000;i++){
            try{
                String s=reader.readLine();
                StringTokenizer st = new StringTokenizer(s);
                
                String x=st.nextToken();
                String y=st.nextToken();
                
                int xn=Integer.parseInt(x);
                int yn=Integer.parseInt(y);
                
                if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                }
                
                
            }catch(IOException e){
                
            }

        }
    }
} Main public static void main(String args[]){
                
        BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
        for(int i=0;i<3000;i++){
            try{
                String s=reader.readLine();
                StringTokenizer st = new StringTokenizer(s);
                
                String x=st.nextToken();
                String y=st.nextToken();
                
                int xn=Integer.parseInt(x);
                int yn=Integer.parseInt(y);
                
                if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                }
                
                
            }catch(IOException e){
                
            }

        }
    } main {
                
        BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
        for(int i=0;i<3000;i++){
            try{
                String s=reader.readLine();
                StringTokenizer st = new StringTokenizer(s);
                
                String x=st.nextToken();
                String y=st.nextToken();
                
                int xn=Integer.parseInt(x);
                int yn=Integer.parseInt(y);
                
                if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                }
                
                
            }catch(IOException e){
                
            }

        }
    } BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) for(int i=0;i<3000;i++){
            try{
                String s=reader.readLine();
                StringTokenizer st = new StringTokenizer(s);
                
                String x=st.nextToken();
                String y=st.nextToken();
                
                int xn=Integer.parseInt(x);
                int yn=Integer.parseInt(y);
                
                if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                }
                
                
            }catch(IOException e){
                
            }

        } int i=0; int i=0; i 0 i<3000 i 3000 i++ i++ i {
            try{
                String s=reader.readLine();
                StringTokenizer st = new StringTokenizer(s);
                
                String x=st.nextToken();
                String y=st.nextToken();
                
                int xn=Integer.parseInt(x);
                int yn=Integer.parseInt(y);
                
                if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                }
                
                
            }catch(IOException e){
                
            }

        } {
            try{
                String s=reader.readLine();
                StringTokenizer st = new StringTokenizer(s);
                
                String x=st.nextToken();
                String y=st.nextToken();
                
                int xn=Integer.parseInt(x);
                int yn=Integer.parseInt(y);
                
                if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                }
                
                
            }catch(IOException e){
                
            }

        } try{
                String s=reader.readLine();
                StringTokenizer st = new StringTokenizer(s);
                
                String x=st.nextToken();
                String y=st.nextToken();
                
                int xn=Integer.parseInt(x);
                int yn=Integer.parseInt(y);
                
                if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                }
                
                
            }catch(IOException e){
                
            } catch(IOException e){
                
            } IOException e {
                
            } {
                String s=reader.readLine();
                StringTokenizer st = new StringTokenizer(s);
                
                String x=st.nextToken();
                String y=st.nextToken();
                
                int xn=Integer.parseInt(x);
                int yn=Integer.parseInt(y);
                
                if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                }
                
                
            } String s=reader.readLine(); s reader.readLine() reader.readLine reader StringTokenizer st = new StringTokenizer(s); st new StringTokenizer(s) String x=st.nextToken(); x st.nextToken() st.nextToken st String y=st.nextToken(); y st.nextToken() st.nextToken st int xn=Integer.parseInt(x); xn Integer.parseInt(x) Integer.parseInt Integer x int yn=Integer.parseInt(y); yn Integer.parseInt(y) Integer.parseInt Integer y if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                } xn==0&&yn==0 xn==0 xn 0 yn==0 yn 0 {
                    break;
                } break; if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                } xn>yn xn yn {
                    System.out.println(yn+" "+xn);
                } System.out.println(yn+" "+xn) System.out.println System.out System System.out yn+" "+xn yn+" "+xn yn " " xn {
                    System.out.println(xn+" "+yn);
                } System.out.println(xn+" "+yn) System.out.println System.out System System.out xn+" "+yn xn+" "+yn xn " " yn String args[] args
import java.io.*;
import java.util.*;

class Main{
    public static void main(String args[]){
                
        BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
        for(int i=0;i<3000;i++){
            try{
                String s=reader.readLine();
                StringTokenizer st = new StringTokenizer(s);
                
                String x=st.nextToken();
                String y=st.nextToken();
                
                int xn=Integer.parseInt(x);
                int yn=Integer.parseInt(y);
                
                if(xn==0&&yn==0){
                    break;
                }else if(xn>yn){
                    System.out.println(yn+" "+xn);
                }else{
                    System.out.println(xn+" "+yn);
                }
                
                
            }catch(IOException e){
                
            }

        }
    }
}