import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();

        while(true){
            String input = br.readLine();
            String[] strArray = input.split(" ");

            int x = Integer.parseInt(strArray[0]);
            int y = Integer.parseInt(strArray[1]);

            int changeBox;

            if(x == 0 && y == 0){
                break;
            }

            if(x > y){
                changeBox = x;
                x = y;
                y = changeBox;
            }
            output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
            System.out.print(output);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();

        while(true){
            String input = br.readLine();
            String[] strArray = input.split(" ");

            int x = Integer.parseInt(strArray[0]);
            int y = Integer.parseInt(strArray[1]);

            int changeBox;

            if(x == 0 && y == 0){
                break;
            }

            if(x > y){
                changeBox = x;
                x = y;
                y = changeBox;
            }
            output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
            System.out.print(output);
    }
} Main public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();

        while(true){
            String input = br.readLine();
            String[] strArray = input.split(" ");

            int x = Integer.parseInt(strArray[0]);
            int y = Integer.parseInt(strArray[1]);

            int changeBox;

            if(x == 0 && y == 0){
                break;
            }

            if(x > y){
                changeBox = x;
                x = y;
                y = changeBox;
            }
            output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
            System.out.print(output);
    } main {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();

        while(true){
            String input = br.readLine();
            String[] strArray = input.split(" ");

            int x = Integer.parseInt(strArray[0]);
            int y = Integer.parseInt(strArray[1]);

            int changeBox;

            if(x == 0 && y == 0){
                break;
            }

            if(x > y){
                changeBox = x;
                x = y;
                y = changeBox;
            }
            output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
            System.out.print(output);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder output = new StringBuilder(); output new StringBuilder() while(true){
            String input = br.readLine();
            String[] strArray = input.split(" ");

            int x = Integer.parseInt(strArray[0]);
            int y = Integer.parseInt(strArray[1]);

            int changeBox;

            if(x == 0 && y == 0){
                break;
            }

            if(x > y){
                changeBox = x;
                x = y;
                y = changeBox;
            }
            output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        } true {
            String input = br.readLine();
            String[] strArray = input.split(" ");

            int x = Integer.parseInt(strArray[0]);
            int y = Integer.parseInt(strArray[1]);

            int changeBox;

            if(x == 0 && y == 0){
                break;
            }

            if(x > y){
                changeBox = x;
                x = y;
                y = changeBox;
            }
            output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        } String input = br.readLine(); input br.readLine() br.readLine br String[] strArray = input.split(" "); strArray input.split(" ") input.split input " " int x = Integer.parseInt(strArray[0]); x Integer.parseInt(strArray[0]) Integer.parseInt Integer strArray[0] strArray 0 int y = Integer.parseInt(strArray[1]); y Integer.parseInt(strArray[1]) Integer.parseInt Integer strArray[1] strArray 1 int changeBox; changeBox if(x == 0 && y == 0){
                break;
            } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                break;
            } break; if(x > y){
                changeBox = x;
                x = y;
                y = changeBox;
            } x > y x y {
                changeBox = x;
                x = y;
                y = changeBox;
            } changeBox = x changeBox x x = y x y y = changeBox y changeBox output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n") output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)) output.append(Integer.toString(x)).append(" ").append output.append(Integer.toString(x)).append(" ") output.append(Integer.toString(x)).append output.append(Integer.toString(x)) output.append output Integer.toString(x) Integer.toString Integer x " " Integer.toString(y) Integer.toString Integer y "\n" System.out.print(output) System.out.print System.out System System.out output String[] args args public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();

        while(true){
            String input = br.readLine();
            String[] strArray = input.split(" ");

            int x = Integer.parseInt(strArray[0]);
            int y = Integer.parseInt(strArray[1]);

            int changeBox;

            if(x == 0 && y == 0){
                break;
            }

            if(x > y){
                changeBox = x;
                x = y;
                y = changeBox;
            }
            output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
            System.out.print(output);
    }
} public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();

        while(true){
            String input = br.readLine();
            String[] strArray = input.split(" ");

            int x = Integer.parseInt(strArray[0]);
            int y = Integer.parseInt(strArray[1]);

            int changeBox;

            if(x == 0 && y == 0){
                break;
            }

            if(x > y){
                changeBox = x;
                x = y;
                y = changeBox;
            }
            output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
            System.out.print(output);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();

        while(true){
            String input = br.readLine();
            String[] strArray = input.split(" ");

            int x = Integer.parseInt(strArray[0]);
            int y = Integer.parseInt(strArray[1]);

            int changeBox;

            if(x == 0 && y == 0){
                break;
            }

            if(x > y){
                changeBox = x;
                x = y;
                y = changeBox;
            }
            output.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
            System.out.print(output);
    }
}