import java.util.Scanner;

public class Main {


    public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int num_mem;
    for(int i=1;; i++)
        {
        String str1 = in.next();
        String str2 = in.next();
        int num1 = Integer.parseInt(str1);
        int num2 = Integer.parseInt(str2);
        if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            }
        }
    }
    
} import java.util.Scanner; Scanner java.util public class Main {


    public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int num_mem;
    for(int i=1;; i++)
        {
        String str1 = in.next();
        String str2 = in.next();
        int num1 = Integer.parseInt(str1);
        int num2 = Integer.parseInt(str2);
        if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            }
        }
    }
    
} Main public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int num_mem;
    for(int i=1;; i++)
        {
        String str1 = in.next();
        String str2 = in.next();
        int num1 = Integer.parseInt(str1);
        int num2 = Integer.parseInt(str2);
        if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            }
        }
    } main {
    Scanner in = new Scanner(System.in);
    int num_mem;
    for(int i=1;; i++)
        {
        String str1 = in.next();
        String str2 = in.next();
        int num1 = Integer.parseInt(str1);
        int num2 = Integer.parseInt(str2);
        if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            }
        }
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int num_mem; num_mem for(int i=1;; i++)
        {
        String str1 = in.next();
        String str2 = in.next();
        int num1 = Integer.parseInt(str1);
        int num2 = Integer.parseInt(str2);
        if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            }
        } int i=1; int i=1; i 1 i++ i++ i {
        String str1 = in.next();
        String str2 = in.next();
        int num1 = Integer.parseInt(str1);
        int num2 = Integer.parseInt(str2);
        if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            }
        } {
        String str1 = in.next();
        String str2 = in.next();
        int num1 = Integer.parseInt(str1);
        int num2 = Integer.parseInt(str2);
        if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            }
        } String str1 = in.next(); str1 in.next() in.next in String str2 = in.next(); str2 in.next() in.next in int num1 = Integer.parseInt(str1); num1 Integer.parseInt(str1) Integer.parseInt Integer str1 int num2 = Integer.parseInt(str2); num2 Integer.parseInt(str2) Integer.parseInt Integer str2 if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            } num1 == 0 && num2 == 0 num1 == 0 num1 0 num2 == 0 num2 0 {break;} break; {
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            } if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                } num1 > num2 num1 num2 {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                } num_mem = num1 num_mem num1 num1 = num2 num1 num2 num2 = num_mem num2 num_mem System.out.println(num1+" "+num2) System.out.println System.out System System.out num1+" "+num2 num1+" "+num2 num1 " " num2 String[] args args public class Main {


    public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int num_mem;
    for(int i=1;; i++)
        {
        String str1 = in.next();
        String str2 = in.next();
        int num1 = Integer.parseInt(str1);
        int num2 = Integer.parseInt(str2);
        if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            }
        }
    }
    
} public class Main {


    public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int num_mem;
    for(int i=1;; i++)
        {
        String str1 = in.next();
        String str2 = in.next();
        int num1 = Integer.parseInt(str1);
        int num2 = Integer.parseInt(str2);
        if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            }
        }
    }
    
} Main
import java.util.Scanner;

public class Main {


    public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int num_mem;
    for(int i=1;; i++)
        {
        String str1 = in.next();
        String str2 = in.next();
        int num1 = Integer.parseInt(str1);
        int num2 = Integer.parseInt(str2);
        if(num1 == 0 && num2 == 0){break;}
        else{
            if(num1 > num2)
                {num_mem = num1;
                num1 = num2;
                num2 = num_mem;
                }
            System.out.println(num1+" "+num2);
            }
        }
    }
    
}