import java.io.*;

class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int num;
        while (true) {
            String[] nums = br.readLine().split(" ");
            int a = Integer.parseInt(nums[0]);
            int b = Integer.parseInt(nums[1]);
            if (a == 0 && b == 0) break;
            else if (a > b) System.out.println(b + " " + a);
            else System.out.println(a + " " + b);
        }
    }
} import java.io.*; io.* java class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int num;
        while (true) {
            String[] nums = br.readLine().split(" ");
            int a = Integer.parseInt(nums[0]);
            int b = Integer.parseInt(nums[1]);
            if (a == 0 && b == 0) break;
            else if (a > b) System.out.println(b + " " + a);
            else System.out.println(a + " " + b);
        }
    }
} Main public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int num;
        while (true) {
            String[] nums = br.readLine().split(" ");
            int a = Integer.parseInt(nums[0]);
            int b = Integer.parseInt(nums[1]);
            if (a == 0 && b == 0) break;
            else if (a > b) System.out.println(b + " " + a);
            else System.out.println(a + " " + b);
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int num;
        while (true) {
            String[] nums = br.readLine().split(" ");
            int a = Integer.parseInt(nums[0]);
            int b = Integer.parseInt(nums[1]);
            if (a == 0 && b == 0) break;
            else if (a > b) System.out.println(b + " " + a);
            else System.out.println(a + " " + b);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int num; num while (true) {
            String[] nums = br.readLine().split(" ");
            int a = Integer.parseInt(nums[0]);
            int b = Integer.parseInt(nums[1]);
            if (a == 0 && b == 0) break;
            else if (a > b) System.out.println(b + " " + a);
            else System.out.println(a + " " + b);
        } true {
            String[] nums = br.readLine().split(" ");
            int a = Integer.parseInt(nums[0]);
            int b = Integer.parseInt(nums[1]);
            if (a == 0 && b == 0) break;
            else if (a > b) System.out.println(b + " " + a);
            else System.out.println(a + " " + b);
        } String[] nums = br.readLine().split(" "); nums br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(nums[0]); a Integer.parseInt(nums[0]) Integer.parseInt Integer nums[0] nums 0 int b = Integer.parseInt(nums[1]); b Integer.parseInt(nums[1]) Integer.parseInt Integer nums[1] nums 1 if (a == 0 && b == 0) break;
            else if (a > b) System.out.println(b + " " + a);
            else System.out.println(a + " " + b); a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; if (a > b) System.out.println(b + " " + a);
            else System.out.println(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 System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b String[] args args
import java.io.*;

class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int num;
        while (true) {
            String[] nums = br.readLine().split(" ");
            int a = Integer.parseInt(nums[0]);
            int b = Integer.parseInt(nums[1]);
            if (a == 0 && b == 0) break;
            else if (a > b) System.out.println(b + " " + a);
            else System.out.println(a + " " + b);
        }
    }
}