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

public class Main {

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

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

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

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

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

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int i = 0; i < x_list.size(); i++) {
            if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            }
        }

    }

} import java.io.*; io.* java import java.util.ArrayList; ArrayList java.util public class Main {

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

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

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

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

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

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int i = 0; i < x_list.size(); i++) {
            if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            }
        }

    }

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

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

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

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

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

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int i = 0; i < x_list.size(); i++) {
            if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            }
        }

    } main {

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

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

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

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

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int i = 0; i < x_list.size(); i++) {
            if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            }
        }

    } ArrayList<Integer> x_list = new ArrayList<>(); x_list new ArrayList<>() ArrayList<Integer> y_list = new ArrayList<>(); y_list new ArrayList<>() int x; x int y; y BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

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

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0); x != 0 || y != 0 x != 0 x 0 y != 0 y 0 {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

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

            x_list.add(x);
            y_list.add(y);

        } String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " x = Integer.parseInt(line[0]) x Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 y = Integer.parseInt(line[1]) y Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 if (x == 0 && y == 0) {
                break;
            } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                break;
            } break; x_list.add(x) x_list.add x_list x y_list.add(y) y_list.add y_list y for (int i = 0; i < x_list.size(); i++) {
            if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            }
        } int i = 0; int i = 0; i 0 i < x_list.size() i x_list.size() x_list.size x_list i++ i++ i {
            if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            }
        } {
            if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            }
        } if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            } x_list.get(i) > y_list.get(i) x_list.get(i) x_list.get x_list i y_list.get(i) y_list.get y_list i {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } System.out.println(y_list.get(i) + " " + x_list.get(i)) System.out.println System.out System System.out y_list.get(i) + " " + x_list.get(i) y_list.get(i) + " " + x_list.get(i) y_list.get(i) y_list.get y_list i " " x_list.get(i) x_list.get x_list i {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            } System.out.println(x_list.get(i) + " " + y_list.get(i)) System.out.println System.out System System.out x_list.get(i) + " " + y_list.get(i) x_list.get(i) + " " + y_list.get(i) x_list.get(i) x_list.get x_list i " " y_list.get(i) y_list.get y_list i String[] args args public class Main {

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

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

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

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

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

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int i = 0; i < x_list.size(); i++) {
            if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            }
        }

    }

} public class Main {

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

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

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

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

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

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int i = 0; i < x_list.size(); i++) {
            if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            }
        }

    }

} Main
import java.io.*;
import java.util.ArrayList;

public class Main {

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

        ArrayList<Integer> x_list = new ArrayList<>();
        ArrayList<Integer> y_list = new ArrayList<>();

        int x;
        int y;

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

        do {
            String[] line = br.readLine().split(" ");
            x = Integer.parseInt(line[0]);
            y = Integer.parseInt(line[1]);

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

            x_list.add(x);
            y_list.add(y);

        } while (x != 0 || y != 0);

        for (int i = 0; i < x_list.size(); i++) {
            if (x_list.get(i) > y_list.get(i)) {
                System.out.println(y_list.get(i) + " " + x_list.get(i));
            } else {
                System.out.println(x_list.get(i) + " " + y_list.get(i));
            }
        }

    }

}