import java.util.Arrays;
import java.util.Scanner;

/**
 *
 * @author lenovo
 */
public class Main {

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

        while (true) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            int[] array = {a, b};
            Arrays.sort(array);
            String s = "" + array[0] +" "+ array[1];

            System.out.println(s);

        }

    }

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

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

        while (true) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            int[] array = {a, b};
            Arrays.sort(array);
            String s = "" + array[0] +" "+ array[1];

            System.out.println(s);

        }

    }

} Main public static void main(String[] args) {
        int count = 0;
        Scanner scanner = new Scanner(System.in);

        while (true) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            int[] array = {a, b};
            Arrays.sort(array);
            String s = "" + array[0] +" "+ array[1];

            System.out.println(s);

        }

    } main {
        int count = 0;
        Scanner scanner = new Scanner(System.in);

        while (true) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            int[] array = {a, b};
            Arrays.sort(array);
            String s = "" + array[0] +" "+ array[1];

            System.out.println(s);

        }

    } int count = 0; count 0 Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while (true) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            int[] array = {a, b};
            Arrays.sort(array);
            String s = "" + array[0] +" "+ array[1];

            System.out.println(s);

        } true {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            int[] array = {a, b};
            Arrays.sort(array);
            String s = "" + array[0] +" "+ array[1];

            System.out.println(s);

        } int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner if (a == 0 && b == 0) {
                break;
            } a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {
                break;
            } break; int[] array = {a, b}; array {a, b} a b Arrays.sort(array) Arrays.sort Arrays array String s = "" + array[0] +" "+ array[1]; s "" + array[0] +" "+ array[1] " " "" + array[0] +" "+ array[1] "" array[0] array 0 " " array[1] array 1 System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {

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

        while (true) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            int[] array = {a, b};
            Arrays.sort(array);
            String s = "" + array[0] +" "+ array[1];

            System.out.println(s);

        }

    }

} public class Main {

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

        while (true) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            int[] array = {a, b};
            Arrays.sort(array);
            String s = "" + array[0] +" "+ array[1];

            System.out.println(s);

        }

    }

} Main
import java.util.Arrays;
import java.util.Scanner;

/**
 *
 * @author lenovo
 */
public class Main {

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

        while (true) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if (a == 0 && b == 0) {
                break;
            }
            int[] array = {a, b};
            Arrays.sort(array);
            String s = "" + array[0] +" "+ array[1];

            System.out.println(s);

        }

    }

}