import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        int intx, inty;
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String[] str = sc.nextLine().split(" ");
            intx = Integer.parseInt(str[0]);
            inty = Integer.parseInt(str[1]);

            if( intx == 0 && inty == 0) break;
            else if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx);
        }
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        int intx, inty;
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String[] str = sc.nextLine().split(" ");
            intx = Integer.parseInt(str[0]);
            inty = Integer.parseInt(str[1]);

            if( intx == 0 && inty == 0) break;
            else if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx);
        }
        sc.close();
    }
} Main public static void main(String[] args) {
        int intx, inty;
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String[] str = sc.nextLine().split(" ");
            intx = Integer.parseInt(str[0]);
            inty = Integer.parseInt(str[1]);

            if( intx == 0 && inty == 0) break;
            else if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx);
        }
        sc.close();
    } main {
        int intx, inty;
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String[] str = sc.nextLine().split(" ");
            intx = Integer.parseInt(str[0]);
            inty = Integer.parseInt(str[1]);

            if( intx == 0 && inty == 0) break;
            else if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx);
        }
        sc.close();
    } int intx intx inty; inty Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
            String[] str = sc.nextLine().split(" ");
            intx = Integer.parseInt(str[0]);
            inty = Integer.parseInt(str[1]);

            if( intx == 0 && inty == 0) break;
            else if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx);
        } sc.hasNext() sc.hasNext sc {
            String[] str = sc.nextLine().split(" ");
            intx = Integer.parseInt(str[0]);
            inty = Integer.parseInt(str[1]);

            if( intx == 0 && inty == 0) break;
            else if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx);
        } String[] str = sc.nextLine().split(" "); str sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " intx = Integer.parseInt(str[0]) intx Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 inty = Integer.parseInt(str[1]) inty Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 if( intx == 0 && inty == 0) break;
            else if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx); intx == 0 && inty == 0 intx == 0 intx 0 inty == 0 inty 0 break; if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx); intx < inty intx inty System.out.println(intx + " " + inty) System.out.println System.out System System.out intx + " " + inty intx + " " + inty intx " " inty System.out.println(inty + " " + intx) System.out.println System.out System System.out inty + " " + intx inty + " " + intx inty " " intx sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {
        int intx, inty;
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String[] str = sc.nextLine().split(" ");
            intx = Integer.parseInt(str[0]);
            inty = Integer.parseInt(str[1]);

            if( intx == 0 && inty == 0) break;
            else if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx);
        }
        sc.close();
    }
} public class Main {

    public static void main(String[] args) {
        int intx, inty;
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String[] str = sc.nextLine().split(" ");
            intx = Integer.parseInt(str[0]);
            inty = Integer.parseInt(str[1]);

            if( intx == 0 && inty == 0) break;
            else if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx);
        }
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        int intx, inty;
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String[] str = sc.nextLine().split(" ");
            intx = Integer.parseInt(str[0]);
            inty = Integer.parseInt(str[1]);

            if( intx == 0 && inty == 0) break;
            else if(intx < inty) System.out.println(intx + " " + inty);
            else System.out.println(inty + " " + intx);
        }
        sc.close();
    }
}