import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        while(s.hasNext()){
            int x = s.nextInt();
            int y = s.nextInt();
            if(x == 0 && y == 0) break;
            String result;
            if( x > y ){
                result = y + " " + x;
            } else {
                result = x + " " + y;
            }
            System.out.println(result);
        }
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        while(s.hasNext()){
            int x = s.nextInt();
            int y = s.nextInt();
            if(x == 0 && y == 0) break;
            String result;
            if( x > y ){
                result = y + " " + x;
            } else {
                result = x + " " + y;
            }
            System.out.println(result);
        }
    }

} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        while(s.hasNext()){
            int x = s.nextInt();
            int y = s.nextInt();
            if(x == 0 && y == 0) break;
            String result;
            if( x > y ){
                result = y + " " + x;
            } else {
                result = x + " " + y;
            }
            System.out.println(result);
        }
    } main {
        Scanner s = new Scanner(System.in);
        while(s.hasNext()){
            int x = s.nextInt();
            int y = s.nextInt();
            if(x == 0 && y == 0) break;
            String result;
            if( x > y ){
                result = y + " " + x;
            } else {
                result = x + " " + y;
            }
            System.out.println(result);
        }
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) while(s.hasNext()){
            int x = s.nextInt();
            int y = s.nextInt();
            if(x == 0 && y == 0) break;
            String result;
            if( x > y ){
                result = y + " " + x;
            } else {
                result = x + " " + y;
            }
            System.out.println(result);
        } s.hasNext() s.hasNext s {
            int x = s.nextInt();
            int y = s.nextInt();
            if(x == 0 && y == 0) break;
            String result;
            if( x > y ){
                result = y + " " + x;
            } else {
                result = x + " " + y;
            }
            System.out.println(result);
        } int x = s.nextInt(); x s.nextInt() s.nextInt s int y = s.nextInt(); y s.nextInt() s.nextInt s if(x == 0 && y == 0) break; x == 0 && y == 0 x == 0 x 0 y == 0 y 0 break; String result; result if( x > y ){
                result = y + " " + x;
            } else {
                result = x + " " + y;
            } x > y x y {
                result = y + " " + x;
            } result = y + " " + x result y + " " + x y + " " + x y " " x {
                result = x + " " + y;
            } result = x + " " + y result x + " " + y x + " " + y x " " y System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        while(s.hasNext()){
            int x = s.nextInt();
            int y = s.nextInt();
            if(x == 0 && y == 0) break;
            String result;
            if( x > y ){
                result = y + " " + x;
            } else {
                result = x + " " + y;
            }
            System.out.println(result);
        }
    }

} public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        while(s.hasNext()){
            int x = s.nextInt();
            int y = s.nextInt();
            if(x == 0 && y == 0) break;
            String result;
            if( x > y ){
                result = y + " " + x;
            } else {
                result = x + " " + y;
            }
            System.out.println(result);
        }
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        while(s.hasNext()){
            int x = s.nextInt();
            int y = s.nextInt();
            if(x == 0 && y == 0) break;
            String result;
            if( x > y ){
                result = y + " " + x;
            } else {
                result = x + " " + y;
            }
            System.out.println(result);
        }
    }

}