import java.util.Scanner;

class Main {

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

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (true) {
            int a = in.nextInt();
            int b = in.nextInt();
            if (a == 0 && b == 0) {
                break;
            } else if (a <= b) {
                System.out.println(a + " " + b);
            } else if (b <= a){
                System.out.println(b + " " + a);
            }
            
        }
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (true) {
            int a = in.nextInt();
            int b = in.nextInt();
            if (a == 0 && b == 0) {
                break;
            } else if (a <= b) {
                System.out.println(a + " " + b);
            } else if (b <= a){
                System.out.println(b + " " + a);
            }
            
        }
    } main {
        Scanner in = new Scanner(System.in);
        while (true) {
            int a = in.nextInt();
            int b = in.nextInt();
            if (a == 0 && b == 0) {
                break;
            } else if (a <= b) {
                System.out.println(a + " " + b);
            } else if (b <= a){
                System.out.println(b + " " + a);
            }
            
        }
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) while (true) {
            int a = in.nextInt();
            int b = in.nextInt();
            if (a == 0 && b == 0) {
                break;
            } else if (a <= b) {
                System.out.println(a + " " + b);
            } else if (b <= a){
                System.out.println(b + " " + a);
            }
            
        } true {
            int a = in.nextInt();
            int b = in.nextInt();
            if (a == 0 && b == 0) {
                break;
            } else if (a <= b) {
                System.out.println(a + " " + b);
            } else if (b <= a){
                System.out.println(b + " " + a);
            }
            
        } int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in if (a == 0 && b == 0) {
                break;
            } else if (a <= b) {
                System.out.println(a + " " + b);
            } else if (b <= a){
                System.out.println(b + " " + a);
            } a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {
                break;
            } break; if (a <= b) {
                System.out.println(a + " " + b);
            } else if (b <= a){
                System.out.println(b + " " + a);
            } a <= b a b {
                System.out.println(a + " " + b);
            } System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b if (b <= a){
                System.out.println(b + " " + a);
            } b <= a b a {
                System.out.println(b + " " + a);
            } System.out.println(b + " " + a) System.out.println System.out System System.out b + " " + a b + " " + a b " " a String[] args args
import java.util.Scanner;

class Main {

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