import java.util.*;

class SwappingTwoNumbers {
    public static void main(String...args) {
        final Scanner sc = new Scanner(System.in);
        while(true) {
            final int a = sc.nextInt();
            final int b = sc.nextInt();
            if(a == 0 && b == 0)
                break;
            System.out.println(a < b ? a + " " + b : b + " " + a);
        }
    }
}
public class Main {
    public static void main(String... args) {
        SwappingTwoNumbers.main();
    }
} import java.util.*; util.* java class SwappingTwoNumbers {
    public static void main(String...args) {
        final Scanner sc = new Scanner(System.in);
        while(true) {
            final int a = sc.nextInt();
            final int b = sc.nextInt();
            if(a == 0 && b == 0)
                break;
            System.out.println(a < b ? a + " " + b : b + " " + a);
        }
    }
} SwappingTwoNumbers public static void main(String...args) {
        final Scanner sc = new Scanner(System.in);
        while(true) {
            final int a = sc.nextInt();
            final int b = sc.nextInt();
            if(a == 0 && b == 0)
                break;
            System.out.println(a < b ? a + " " + b : b + " " + a);
        }
    } main {
        final Scanner sc = new Scanner(System.in);
        while(true) {
            final int a = sc.nextInt();
            final int b = sc.nextInt();
            if(a == 0 && b == 0)
                break;
            System.out.println(a < b ? a + " " + b : b + " " + a);
        }
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(true) {
            final int a = sc.nextInt();
            final int b = sc.nextInt();
            if(a == 0 && b == 0)
                break;
            System.out.println(a < b ? a + " " + b : b + " " + a);
        } true {
            final int a = sc.nextInt();
            final int b = sc.nextInt();
            if(a == 0 && b == 0)
                break;
            System.out.println(a < b ? a + " " + b : b + " " + a);
        } final int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc final int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc if(a == 0 && b == 0)
                break; a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; System.out.println(a < b ? a + " " + b : b + " " + a) System.out.println System.out System System.out a < b ? a + " " + b : b + " " + a a < b a b a + " " + b a + " " + b a " " b b + " " + a b + " " + a b " " a String...args args public class Main {
    public static void main(String... args) {
        SwappingTwoNumbers.main();
    }
} Main public static void main(String... args) {
        SwappingTwoNumbers.main();
    } main {
        SwappingTwoNumbers.main();
    } SwappingTwoNumbers.main() SwappingTwoNumbers.main SwappingTwoNumbers String... args args public class Main {
    public static void main(String... args) {
        SwappingTwoNumbers.main();
    }
} public class Main {
    public static void main(String... args) {
        SwappingTwoNumbers.main();
    }
} Main
import java.util.*;

class SwappingTwoNumbers {
    public static void main(String...args) {
        final Scanner sc = new Scanner(System.in);
        while(true) {
            final int a = sc.nextInt();
            final int b = sc.nextInt();
            if(a == 0 && b == 0)
                break;
            System.out.println(a < b ? a + " " + b : b + " " + a);
        }
    }
}
public class Main {
    public static void main(String... args) {
        SwappingTwoNumbers.main();
    }
}