import java.io.*;

public class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String[] str = br.readLine().split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);

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

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

            if(x == 0 && y == 0){
                break;
            }else if(x > y){
                int swp = x;
                x = y;
                y = swp;
            }
            System.out.println(x +" "+ y);
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String[] str = br.readLine().split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);

            if(x == 0 && y == 0){
                break;
            }else if(x > y){
                int swp = x;
                x = y;
                y = swp;
            }
            System.out.println(x +" "+ y);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
            String[] str = br.readLine().split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);

            if(x == 0 && y == 0){
                break;
            }else if(x > y){
                int swp = x;
                x = y;
                y = swp;
            }
            System.out.println(x +" "+ y);
        } true {
            String[] str = br.readLine().split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);

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

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

            if(x == 0 && y == 0){
                break;
            }else if(x > y){
                int swp = x;
                x = y;
                y = swp;
            }
            System.out.println(x +" "+ y);
        }
    }
} Main
import java.io.*;

public class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String[] str = br.readLine().split(" ");
            int x = Integer.parseInt(str[0]);
            int y = Integer.parseInt(str[1]);

            if(x == 0 && y == 0){
                break;
            }else if(x > y){
                int swp = x;
                x = y;
                y = swp;
            }
            System.out.println(x +" "+ y);
        }
    }
}