import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        do{
            int a = scan.nextInt();
            int b = scan.nextInt();

            if (a == 0 && b == 0)
                break;
    
            if (a > b){
                int tmp = a;
                a = b;
                b = tmp;
            }

            System.out.println(a + " " + b);
        }while(true);
    }
}

     import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        do{
            int a = scan.nextInt();
            int b = scan.nextInt();

            if (a == 0 && b == 0)
                break;
    
            if (a > b){
                int tmp = a;
                a = b;
                b = tmp;
            }

            System.out.println(a + " " + b);
        }while(true);
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        do{
            int a = scan.nextInt();
            int b = scan.nextInt();

            if (a == 0 && b == 0)
                break;
    
            if (a > b){
                int tmp = a;
                a = b;
                b = tmp;
            }

            System.out.println(a + " " + b);
        }while(true);
    } main {
        Scanner scan = new Scanner(System.in);

        do{
            int a = scan.nextInt();
            int b = scan.nextInt();

            if (a == 0 && b == 0)
                break;
    
            if (a > b){
                int tmp = a;
                a = b;
                b = tmp;
            }

            System.out.println(a + " " + b);
        }while(true);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) do{
            int a = scan.nextInt();
            int b = scan.nextInt();

            if (a == 0 && b == 0)
                break;
    
            if (a > b){
                int tmp = a;
                a = b;
                b = tmp;
            }

            System.out.println(a + " " + b);
        }while(true); true {
            int a = scan.nextInt();
            int b = scan.nextInt();

            if (a == 0 && b == 0)
                break;
    
            if (a > b){
                int tmp = a;
                a = b;
                b = tmp;
            }

            System.out.println(a + " " + b);
        } int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan if (a == 0 && b == 0)
                break; a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; if (a > b){
                int tmp = a;
                a = b;
                b = tmp;
            } a > b a b {
                int tmp = a;
                a = b;
                b = tmp;
            } int tmp = a; tmp a a = b a b b = tmp b tmp System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b String[] args args
import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        do{
            int a = scan.nextInt();
            int b = scan.nextInt();

            if (a == 0 && b == 0)
                break;
    
            if (a > b){
                int tmp = a;
                a = b;
                b = tmp;
            }

            System.out.println(a + " " + b);
        }while(true);
    }
}

    