import java.util.Scanner;

public class Main {

    static final String SPACE = " ";
    static final String RN = "\n";

    public static void main(String[] args) {
        // input
        int x;
        int y;

        StringBuilder sb = new StringBuilder();
        Scanner sc = new Scanner(System.in);
        int temp;

        while (true) {
            x = sc.nextInt();
            y = sc.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            if (x > y) {
                sb.append(y).append(SPACE).append(x).append(RN);
            } else {
                sb.append(x).append(SPACE).append(y).append(RN);
            }
        }

        // output
        System.out.print(sb);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    static final String SPACE = " ";
    static final String RN = "\n";

    public static void main(String[] args) {
        // input
        int x;
        int y;

        StringBuilder sb = new StringBuilder();
        Scanner sc = new Scanner(System.in);
        int temp;

        while (true) {
            x = sc.nextInt();
            y = sc.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            if (x > y) {
                sb.append(y).append(SPACE).append(x).append(RN);
            } else {
                sb.append(x).append(SPACE).append(y).append(RN);
            }
        }

        // output
        System.out.print(sb);
    }
} Main static final String SPACE = " "; SPACE " " static final String RN = "\n"; RN "\n" public static void main(String[] args) {
        // input
        int x;
        int y;

        StringBuilder sb = new StringBuilder();
        Scanner sc = new Scanner(System.in);
        int temp;

        while (true) {
            x = sc.nextInt();
            y = sc.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            if (x > y) {
                sb.append(y).append(SPACE).append(x).append(RN);
            } else {
                sb.append(x).append(SPACE).append(y).append(RN);
            }
        }

        // output
        System.out.print(sb);
    } main {
        // input
        int x;
        int y;

        StringBuilder sb = new StringBuilder();
        Scanner sc = new Scanner(System.in);
        int temp;

        while (true) {
            x = sc.nextInt();
            y = sc.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            if (x > y) {
                sb.append(y).append(SPACE).append(x).append(RN);
            } else {
                sb.append(x).append(SPACE).append(y).append(RN);
            }
        }

        // output
        System.out.print(sb);
    } int x; x int y; y StringBuilder sb = new StringBuilder(); sb new StringBuilder() Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int temp; temp while (true) {
            x = sc.nextInt();
            y = sc.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            if (x > y) {
                sb.append(y).append(SPACE).append(x).append(RN);
            } else {
                sb.append(x).append(SPACE).append(y).append(RN);
            }
        } true {
            x = sc.nextInt();
            y = sc.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            if (x > y) {
                sb.append(y).append(SPACE).append(x).append(RN);
            } else {
                sb.append(x).append(SPACE).append(y).append(RN);
            }
        } x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc if (x == 0 && y == 0) {
                break;
            } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                break;
            } break; if (x > y) {
                sb.append(y).append(SPACE).append(x).append(RN);
            } else {
                sb.append(x).append(SPACE).append(y).append(RN);
            } x > y x y {
                sb.append(y).append(SPACE).append(x).append(RN);
            } sb.append(y).append(SPACE).append(x).append(RN) sb.append(y).append(SPACE).append(x).append sb.append(y).append(SPACE).append(x) sb.append(y).append(SPACE).append sb.append(y).append(SPACE) sb.append(y).append sb.append(y) sb.append sb y SPACE x RN {
                sb.append(x).append(SPACE).append(y).append(RN);
            } sb.append(x).append(SPACE).append(y).append(RN) sb.append(x).append(SPACE).append(y).append sb.append(x).append(SPACE).append(y) sb.append(x).append(SPACE).append sb.append(x).append(SPACE) sb.append(x).append sb.append(x) sb.append sb x SPACE y RN System.out.print(sb) System.out.print System.out System System.out sb String[] args args public class Main {

    static final String SPACE = " ";
    static final String RN = "\n";

    public static void main(String[] args) {
        // input
        int x;
        int y;

        StringBuilder sb = new StringBuilder();
        Scanner sc = new Scanner(System.in);
        int temp;

        while (true) {
            x = sc.nextInt();
            y = sc.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            if (x > y) {
                sb.append(y).append(SPACE).append(x).append(RN);
            } else {
                sb.append(x).append(SPACE).append(y).append(RN);
            }
        }

        // output
        System.out.print(sb);
    }
} public class Main {

    static final String SPACE = " ";
    static final String RN = "\n";

    public static void main(String[] args) {
        // input
        int x;
        int y;

        StringBuilder sb = new StringBuilder();
        Scanner sc = new Scanner(System.in);
        int temp;

        while (true) {
            x = sc.nextInt();
            y = sc.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            if (x > y) {
                sb.append(y).append(SPACE).append(x).append(RN);
            } else {
                sb.append(x).append(SPACE).append(y).append(RN);
            }
        }

        // output
        System.out.print(sb);
    }
} Main
import java.util.Scanner;

public class Main {

    static final String SPACE = " ";
    static final String RN = "\n";

    public static void main(String[] args) {
        // input
        int x;
        int y;

        StringBuilder sb = new StringBuilder();
        Scanner sc = new Scanner(System.in);
        int temp;

        while (true) {
            x = sc.nextInt();
            y = sc.nextInt();
            if (x == 0 && y == 0) {
                break;
            }
            if (x > y) {
                sb.append(y).append(SPACE).append(x).append(RN);
            } else {
                sb.append(x).append(SPACE).append(y).append(RN);
            }
        }

        // output
        System.out.print(sb);
    }
}