import java.util.*;
class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        for(;;) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            if(a == 0 && b == 0) break;
            System.out.println("" + Math.min(a, b) + " " + Math.max(a,b));
        }
    }
} import java.util.*; util.* java class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        for(;;) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            if(a == 0 && b == 0) break;
            System.out.println("" + Math.min(a, b) + " " + Math.max(a,b));
        }
    }
} Main public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        for(;;) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            if(a == 0 && b == 0) break;
            System.out.println("" + Math.min(a, b) + " " + Math.max(a,b));
        }
    } main {
        Scanner sc = new Scanner(System.in);
        for(;;) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            if(a == 0 && b == 0) break;
            System.out.println("" + Math.min(a, b) + " " + Math.max(a,b));
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(;;) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            if(a == 0 && b == 0) break;
            System.out.println("" + Math.min(a, b) + " " + Math.max(a,b));
        } ; {
            int a = sc.nextInt();
            int b = sc.nextInt();
            if(a == 0 && b == 0) break;
            System.out.println("" + Math.min(a, b) + " " + Math.max(a,b));
        } {
            int a = sc.nextInt();
            int b = sc.nextInt();
            if(a == 0 && b == 0) break;
            System.out.println("" + Math.min(a, b) + " " + Math.max(a,b));
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc if(a == 0 && b == 0) break; a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; System.out.println("" + Math.min(a, b) + " " + Math.max(a,b)) System.out.println System.out System System.out "" + Math.min(a, b) + " " + Math.max(a,b) " " "" + Math.min(a, b) + " " + Math.max(a,b) "" Math.min(a, b) Math.min Math a b " " Math.max(a,b) Math.max Math a b String[]args args
import java.util.*;
class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        for(;;) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            if(a == 0 && b == 0) break;
            System.out.println("" + Math.min(a, b) + " " + Math.max(a,b));
        }
    }
}