import java.util.Scanner;
class Main{
    int x, y, z = 0;
    public void aaaa(){
        Scanner sc = new Scanner(System.in);
        x = sc.nextInt();
        y = sc.nextInt();
        while(z == 0){
            if (x < y){
                System.out.println(x + " " + y);
            }else{
                System.out.println(y + " " + x);
            }
            x = sc.nextInt();
            y = sc.nextInt();
            if(x == 0 && y == 0){
                z++;
            }
        }
        
    }
    public static void main(String[] args){
        new Main().aaaa();
    }
        
} import java.util.Scanner; Scanner java.util class Main{
    int x, y, z = 0;
    public void aaaa(){
        Scanner sc = new Scanner(System.in);
        x = sc.nextInt();
        y = sc.nextInt();
        while(z == 0){
            if (x < y){
                System.out.println(x + " " + y);
            }else{
                System.out.println(y + " " + x);
            }
            x = sc.nextInt();
            y = sc.nextInt();
            if(x == 0 && y == 0){
                z++;
            }
        }
        
    }
    public static void main(String[] args){
        new Main().aaaa();
    }
        
} Main int x x y y z = 0; z 0 public void aaaa(){
        Scanner sc = new Scanner(System.in);
        x = sc.nextInt();
        y = sc.nextInt();
        while(z == 0){
            if (x < y){
                System.out.println(x + " " + y);
            }else{
                System.out.println(y + " " + x);
            }
            x = sc.nextInt();
            y = sc.nextInt();
            if(x == 0 && y == 0){
                z++;
            }
        }
        
    } aaaa {
        Scanner sc = new Scanner(System.in);
        x = sc.nextInt();
        y = sc.nextInt();
        while(z == 0){
            if (x < y){
                System.out.println(x + " " + y);
            }else{
                System.out.println(y + " " + x);
            }
            x = sc.nextInt();
            y = sc.nextInt();
            if(x == 0 && y == 0){
                z++;
            }
        }
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc while(z == 0){
            if (x < y){
                System.out.println(x + " " + y);
            }else{
                System.out.println(y + " " + x);
            }
            x = sc.nextInt();
            y = sc.nextInt();
            if(x == 0 && y == 0){
                z++;
            }
        } z == 0 z 0 {
            if (x < y){
                System.out.println(x + " " + y);
            }else{
                System.out.println(y + " " + x);
            }
            x = sc.nextInt();
            y = sc.nextInt();
            if(x == 0 && y == 0){
                z++;
            }
        } if (x < y){
                System.out.println(x + " " + y);
            }else{
                System.out.println(y + " " + x);
            } x < y x y {
                System.out.println(x + " " + y);
            } System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y {
                System.out.println(y + " " + x);
            } System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc if(x == 0 && y == 0){
                z++;
            } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                z++;
            } z++ z public static void main(String[] args){
        new Main().aaaa();
    } main {
        new Main().aaaa();
    } new Main().aaaa() new Main().aaaa new Main() String[] args args
import java.util.Scanner;
class Main{
    int x, y, z = 0;
    public void aaaa(){
        Scanner sc = new Scanner(System.in);
        x = sc.nextInt();
        y = sc.nextInt();
        while(z == 0){
            if (x < y){
                System.out.println(x + " " + y);
            }else{
                System.out.println(y + " " + x);
            }
            x = sc.nextInt();
            y = sc.nextInt();
            if(x == 0 && y == 0){
                z++;
            }
        }
        
    }
    public static void main(String[] args){
        new Main().aaaa();
    }
        
}