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 str = new StringBuilder();
        String[] data;
        int x, y;
        while (true) {
            data = br.readLine().split(" ");
            x = Integer.parseInt(data[0]);
            y = Integer.parseInt(data[1]);
            if (x == 0 && y == 0) {
                break;
            }
            if (x < y) {
                str.append(x).append(" ").append(y).append("\n");
            } else {
                str.append(y).append(" ").append(x).append("\n");
            }
        }
        System.out.print(str);
    }
} 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 str = new StringBuilder();
        String[] data;
        int x, y;
        while (true) {
            data = br.readLine().split(" ");
            x = Integer.parseInt(data[0]);
            y = Integer.parseInt(data[1]);
            if (x == 0 && y == 0) {
                break;
            }
            if (x < y) {
                str.append(x).append(" ").append(y).append("\n");
            } else {
                str.append(y).append(" ").append(x).append("\n");
            }
        }
        System.out.print(str);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));
        StringBuilder str = new StringBuilder();
        String[] data;
        int x, y;
        while (true) {
            data = br.readLine().split(" ");
            x = Integer.parseInt(data[0]);
            y = Integer.parseInt(data[1]);
            if (x == 0 && y == 0) {
                break;
            }
            if (x < y) {
                str.append(x).append(" ").append(y).append("\n");
            } else {
                str.append(y).append(" ").append(x).append("\n");
            }
        }
        System.out.print(str);
    } main {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));
        StringBuilder str = new StringBuilder();
        String[] data;
        int x, y;
        while (true) {
            data = br.readLine().split(" ");
            x = Integer.parseInt(data[0]);
            y = Integer.parseInt(data[1]);
            if (x == 0 && y == 0) {
                break;
            }
            if (x < y) {
                str.append(x).append(" ").append(y).append("\n");
            } else {
                str.append(y).append(" ").append(x).append("\n");
            }
        }
        System.out.print(str);
    } BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in)); br new BufferedReader(
            new InputStreamReader(System.in)) StringBuilder str = new StringBuilder(); str new StringBuilder() String[] data; data int x x y; y while (true) {
            data = br.readLine().split(" ");
            x = Integer.parseInt(data[0]);
            y = Integer.parseInt(data[1]);
            if (x == 0 && y == 0) {
                break;
            }
            if (x < y) {
                str.append(x).append(" ").append(y).append("\n");
            } else {
                str.append(y).append(" ").append(x).append("\n");
            }
        } true {
            data = br.readLine().split(" ");
            x = Integer.parseInt(data[0]);
            y = Integer.parseInt(data[1]);
            if (x == 0 && y == 0) {
                break;
            }
            if (x < y) {
                str.append(x).append(" ").append(y).append("\n");
            } else {
                str.append(y).append(" ").append(x).append("\n");
            }
        } data = br.readLine().split(" ") data br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " x = Integer.parseInt(data[0]) x Integer.parseInt(data[0]) Integer.parseInt Integer data[0] data 0 y = Integer.parseInt(data[1]) y Integer.parseInt(data[1]) Integer.parseInt Integer data[1] data 1 if (x == 0 && y == 0) {
                break;
            } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                break;
            } break; if (x < y) {
                str.append(x).append(" ").append(y).append("\n");
            } else {
                str.append(y).append(" ").append(x).append("\n");
            } x < y x y {
                str.append(x).append(" ").append(y).append("\n");
            } str.append(x).append(" ").append(y).append("\n") str.append(x).append(" ").append(y).append str.append(x).append(" ").append(y) str.append(x).append(" ").append str.append(x).append(" ") str.append(x).append str.append(x) str.append str x " " y "\n" {
                str.append(y).append(" ").append(x).append("\n");
            } str.append(y).append(" ").append(x).append("\n") str.append(y).append(" ").append(x).append str.append(y).append(" ").append(x) str.append(y).append(" ").append str.append(y).append(" ") str.append(y).append str.append(y) str.append str y " " x "\n" System.out.print(str) System.out.print System.out System System.out str String[] args args public class Main {

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

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
            new InputStreamReader(System.in));
        StringBuilder str = new StringBuilder();
        String[] data;
        int x, y;
        while (true) {
            data = br.readLine().split(" ");
            x = Integer.parseInt(data[0]);
            y = Integer.parseInt(data[1]);
            if (x == 0 && y == 0) {
                break;
            }
            if (x < y) {
                str.append(x).append(" ").append(y).append("\n");
            } else {
                str.append(y).append(" ").append(x).append("\n");
            }
        }
        System.out.print(str);
    }
} 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 str = new StringBuilder();
        String[] data;
        int x, y;
        while (true) {
            data = br.readLine().split(" ");
            x = Integer.parseInt(data[0]);
            y = Integer.parseInt(data[1]);
            if (x == 0 && y == 0) {
                break;
            }
            if (x < y) {
                str.append(x).append(" ").append(y).append("\n");
            } else {
                str.append(y).append(" ").append(x).append("\n");
            }
        }
        System.out.print(str);
    }
}