
import java.util.Scanner;

public class Main {

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

        int x = scanner.nextInt();
        int y = scanner.nextInt();
        while( x+y > 0 ){
            if(x > y){
                int a = x;
                x = y;
                y = a;
            }
            
            System.out.println(x+" "+y);
            x = scanner.nextInt();
            y = scanner.nextInt();
        }
    }
}
 import java.util.Scanner; Scanner java.util public class Main {

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

        int x = scanner.nextInt();
        int y = scanner.nextInt();
        while( x+y > 0 ){
            if(x > y){
                int a = x;
                x = y;
                y = a;
            }
            
            System.out.println(x+" "+y);
            x = scanner.nextInt();
            y = scanner.nextInt();
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int x = scanner.nextInt();
        int y = scanner.nextInt();
        while( x+y > 0 ){
            if(x > y){
                int a = x;
                x = y;
                y = a;
            }
            
            System.out.println(x+" "+y);
            x = scanner.nextInt();
            y = scanner.nextInt();
        }
    } main {
        Scanner scanner = new Scanner(System.in);

        int x = scanner.nextInt();
        int y = scanner.nextInt();
        while( x+y > 0 ){
            if(x > y){
                int a = x;
                x = y;
                y = a;
            }
            
            System.out.println(x+" "+y);
            x = scanner.nextInt();
            y = scanner.nextInt();
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int y = scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner while( x+y > 0 ){
            if(x > y){
                int a = x;
                x = y;
                y = a;
            }
            
            System.out.println(x+" "+y);
            x = scanner.nextInt();
            y = scanner.nextInt();
        } x+y > 0 x+y x y 0 {
            if(x > y){
                int a = x;
                x = y;
                y = a;
            }
            
            System.out.println(x+" "+y);
            x = scanner.nextInt();
            y = scanner.nextInt();
        } if(x > y){
                int a = x;
                x = y;
                y = a;
            } x > y x y {
                int a = x;
                x = y;
                y = a;
            } int a = x; a x x = y x y y = a y a System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y x = scanner.nextInt() x scanner.nextInt() scanner.nextInt scanner y = scanner.nextInt() y scanner.nextInt() scanner.nextInt scanner String[] args args public class Main {

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

        int x = scanner.nextInt();
        int y = scanner.nextInt();
        while( x+y > 0 ){
            if(x > y){
                int a = x;
                x = y;
                y = a;
            }
            
            System.out.println(x+" "+y);
            x = scanner.nextInt();
            y = scanner.nextInt();
        }
    }
} public class Main {

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

        int x = scanner.nextInt();
        int y = scanner.nextInt();
        while( x+y > 0 ){
            if(x > y){
                int a = x;
                x = y;
                y = a;
            }
            
            System.out.println(x+" "+y);
            x = scanner.nextInt();
            y = scanner.nextInt();
        }
    }
} Main

import java.util.Scanner;

public class Main {

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

        int x = scanner.nextInt();
        int y = scanner.nextInt();
        while( x+y > 0 ){
            if(x > y){
                int a = x;
                x = y;
                y = a;
            }
            
            System.out.println(x+" "+y);
            x = scanner.nextInt();
            y = scanner.nextInt();
        }
    }
}

