import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = 1;
        int b = 1;

        while (true) {
            a = scanner.nextInt();
            b = scanner.nextInt();
            if (a > b) {
                int c;
                c = a;
                a = b;
                b = c;
            }
            if (a == 0 && b ==0) {
                break;
            }
            System.out.println(a + " " + b);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = 1;
        int b = 1;

        while (true) {
            a = scanner.nextInt();
            b = scanner.nextInt();
            if (a > b) {
                int c;
                c = a;
                a = b;
                b = c;
            }
            if (a == 0 && b ==0) {
                break;
            }
            System.out.println(a + " " + b);
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = 1;
        int b = 1;

        while (true) {
            a = scanner.nextInt();
            b = scanner.nextInt();
            if (a > b) {
                int c;
                c = a;
                a = b;
                b = c;
            }
            if (a == 0 && b ==0) {
                break;
            }
            System.out.println(a + " " + b);
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        int a = 1;
        int b = 1;

        while (true) {
            a = scanner.nextInt();
            b = scanner.nextInt();
            if (a > b) {
                int c;
                c = a;
                a = b;
                b = c;
            }
            if (a == 0 && b ==0) {
                break;
            }
            System.out.println(a + " " + b);
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = 1; a 1 int b = 1; b 1 while (true) {
            a = scanner.nextInt();
            b = scanner.nextInt();
            if (a > b) {
                int c;
                c = a;
                a = b;
                b = c;
            }
            if (a == 0 && b ==0) {
                break;
            }
            System.out.println(a + " " + b);
        } true {
            a = scanner.nextInt();
            b = scanner.nextInt();
            if (a > b) {
                int c;
                c = a;
                a = b;
                b = c;
            }
            if (a == 0 && b ==0) {
                break;
            }
            System.out.println(a + " " + b);
        } a = scanner.nextInt() a scanner.nextInt() scanner.nextInt scanner b = scanner.nextInt() b scanner.nextInt() scanner.nextInt scanner if (a > b) {
                int c;
                c = a;
                a = b;
                b = c;
            } a > b a b {
                int c;
                c = a;
                a = b;
                b = c;
            } int c; c c = a c a a = b a b b = c b c if (a == 0 && b ==0) {
                break;
            } a == 0 && b ==0 a == 0 a 0 b ==0 b 0 {
                break;
            } break; System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = 1;
        int b = 1;

        while (true) {
            a = scanner.nextInt();
            b = scanner.nextInt();
            if (a > b) {
                int c;
                c = a;
                a = b;
                b = c;
            }
            if (a == 0 && b ==0) {
                break;
            }
            System.out.println(a + " " + b);
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = 1;
        int b = 1;

        while (true) {
            a = scanner.nextInt();
            b = scanner.nextInt();
            if (a > b) {
                int c;
                c = a;
                a = b;
                b = c;
            }
            if (a == 0 && b ==0) {
                break;
            }
            System.out.println(a + " " + b);
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = 1;
        int b = 1;

        while (true) {
            a = scanner.nextInt();
            b = scanner.nextInt();
            if (a > b) {
                int c;
                c = a;
                a = b;
                b = c;
            }
            if (a == 0 && b ==0) {
                break;
            }
            System.out.println(a + " " + b);
        }
    }
}