import java.io.*;
public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        int x,y,tmp;
        while(true){
        String str=buf.readLine();
        String[] yuu=str.split(" ");
        
        x=Integer.parseInt(yuu[0]);
        y=Integer.parseInt(yuu[1]);
        
        if(x==0 && y==0){
            break;
        }else if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            }
        sb.append(x).append(" ").append(y).append("\n");
        }
        System.out.print(sb);
    }
} import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        int x,y,tmp;
        while(true){
        String str=buf.readLine();
        String[] yuu=str.split(" ");
        
        x=Integer.parseInt(yuu[0]);
        y=Integer.parseInt(yuu[1]);
        
        if(x==0 && y==0){
            break;
        }else if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            }
        sb.append(x).append(" ").append(y).append("\n");
        }
        System.out.print(sb);
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        int x,y,tmp;
        while(true){
        String str=buf.readLine();
        String[] yuu=str.split(" ");
        
        x=Integer.parseInt(yuu[0]);
        y=Integer.parseInt(yuu[1]);
        
        if(x==0 && y==0){
            break;
        }else if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            }
        sb.append(x).append(" ").append(y).append("\n");
        }
        System.out.print(sb);
    } main {
        BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        int x,y,tmp;
        while(true){
        String str=buf.readLine();
        String[] yuu=str.split(" ");
        
        x=Integer.parseInt(yuu[0]);
        y=Integer.parseInt(yuu[1]);
        
        if(x==0 && y==0){
            break;
        }else if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            }
        sb.append(x).append(" ").append(y).append("\n");
        }
        System.out.print(sb);
    } BufferedReader buf=new BufferedReader(new InputStreamReader(System.in)); buf new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb=new StringBuilder(); sb new StringBuilder() int x x y y tmp; tmp while(true){
        String str=buf.readLine();
        String[] yuu=str.split(" ");
        
        x=Integer.parseInt(yuu[0]);
        y=Integer.parseInt(yuu[1]);
        
        if(x==0 && y==0){
            break;
        }else if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            }
        sb.append(x).append(" ").append(y).append("\n");
        } true {
        String str=buf.readLine();
        String[] yuu=str.split(" ");
        
        x=Integer.parseInt(yuu[0]);
        y=Integer.parseInt(yuu[1]);
        
        if(x==0 && y==0){
            break;
        }else if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            }
        sb.append(x).append(" ").append(y).append("\n");
        } String str=buf.readLine(); str buf.readLine() buf.readLine buf String[] yuu=str.split(" "); yuu str.split(" ") str.split str " " x=Integer.parseInt(yuu[0]) x Integer.parseInt(yuu[0]) Integer.parseInt Integer yuu[0] yuu 0 y=Integer.parseInt(yuu[1]) y Integer.parseInt(yuu[1]) Integer.parseInt Integer yuu[1] yuu 1 if(x==0 && y==0){
            break;
        }else if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            } x==0 && y==0 x==0 x 0 y==0 y 0 {
            break;
        } break; if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            } x>y x y {
            tmp=x;
            x=y;
            y=tmp;
            } tmp=x tmp x x=y x y y=tmp y tmp sb.append(x).append(" ").append(y).append("\n") sb.append(x).append(" ").append(y).append sb.append(x).append(" ").append(y) sb.append(x).append(" ").append sb.append(x).append(" ") sb.append(x).append sb.append(x) sb.append sb x " " y "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        int x,y,tmp;
        while(true){
        String str=buf.readLine();
        String[] yuu=str.split(" ");
        
        x=Integer.parseInt(yuu[0]);
        y=Integer.parseInt(yuu[1]);
        
        if(x==0 && y==0){
            break;
        }else if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            }
        sb.append(x).append(" ").append(y).append("\n");
        }
        System.out.print(sb);
    }
} public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        int x,y,tmp;
        while(true){
        String str=buf.readLine();
        String[] yuu=str.split(" ");
        
        x=Integer.parseInt(yuu[0]);
        y=Integer.parseInt(yuu[1]);
        
        if(x==0 && y==0){
            break;
        }else if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            }
        sb.append(x).append(" ").append(y).append("\n");
        }
        System.out.print(sb);
    }
} Main
import java.io.*;
public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        int x,y,tmp;
        while(true){
        String str=buf.readLine();
        String[] yuu=str.split(" ");
        
        x=Integer.parseInt(yuu[0]);
        y=Integer.parseInt(yuu[1]);
        
        if(x==0 && y==0){
            break;
        }else if(x>y){
            tmp=x;
            x=y;
            y=tmp;
            }
        sb.append(x).append(" ").append(y).append("\n");
        }
        System.out.print(sb);
    }
}