import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        while(true){
            int a = scan.nextInt();
            int b = scan.nextInt();
            if(a == 0 && b == 0) break;
            if(a < b) System.out.println(a + " " + b);
            else System.out.println(b + " " + a);
        }
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        while(true){
            int a = scan.nextInt();
            int b = scan.nextInt();
            if(a == 0 && b == 0) break;
            if(a < b) System.out.println(a + " " + b);
            else System.out.println(b + " " + a);
        }
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        while(true){
            int a = scan.nextInt();
            int b = scan.nextInt();
            if(a == 0 && b == 0) break;
            if(a < b) System.out.println(a + " " + b);
            else System.out.println(b + " " + a);
        }
    } main {
        Scanner scan = new Scanner(System.in);
        while(true){
            int a = scan.nextInt();
            int b = scan.nextInt();
            if(a == 0 && b == 0) break;
            if(a < b) System.out.println(a + " " + b);
            else System.out.println(b + " " + a);
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(true){
            int a = scan.nextInt();
            int b = scan.nextInt();
            if(a == 0 && b == 0) break;
            if(a < b) System.out.println(a + " " + b);
            else System.out.println(b + " " + a);
        } true {
            int a = scan.nextInt();
            int b = scan.nextInt();
            if(a == 0 && b == 0) break;
            if(a < b) System.out.println(a + " " + b);
            else System.out.println(b + " " + a);
        } int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan if(a == 0 && b == 0) break; a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; if(a < b) System.out.println(a + " " + b);
            else System.out.println(b + " " + a); a < b a b System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b System.out.println(b + " " + a) System.out.println System.out System System.out b + " " + a b + " " + a b " " a String[] args args
import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        while(true){
            int a = scan.nextInt();
            int b = scan.nextInt();
            if(a == 0 && b == 0) break;
            if(a < b) System.out.println(a + " " + b);
            else System.out.println(b + " " + a);
        }
    }
}