import java.io.*;
 class Main{
    public static void main(String[] args) throws Exception {
        BufferedReader line = new BufferedReader(new InputStreamReader(System.in));
        String str = null;
        while ((str = line.readLine()) != null) {
            String[] arr = str.split(" ");
            if ("0".equals(arr[0]) && "0".equals(arr[1]))
                break;
            int x = Integer.parseInt(arr[0]);
            int y = Integer.parseInt(arr[1]);
 
            if (x > y)
                System.out.println(y + " " + x);
            else
                System.out.println(x + " " + y);
        }
    }
} import java.io.*; io.* java class Main{
    public static void main(String[] args) throws Exception {
        BufferedReader line = new BufferedReader(new InputStreamReader(System.in));
        String str = null;
        while ((str = line.readLine()) != null) {
            String[] arr = str.split(" ");
            if ("0".equals(arr[0]) && "0".equals(arr[1]))
                break;
            int x = Integer.parseInt(arr[0]);
            int y = Integer.parseInt(arr[1]);
 
            if (x > y)
                System.out.println(y + " " + x);
            else
                System.out.println(x + " " + y);
        }
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader line = new BufferedReader(new InputStreamReader(System.in));
        String str = null;
        while ((str = line.readLine()) != null) {
            String[] arr = str.split(" ");
            if ("0".equals(arr[0]) && "0".equals(arr[1]))
                break;
            int x = Integer.parseInt(arr[0]);
            int y = Integer.parseInt(arr[1]);
 
            if (x > y)
                System.out.println(y + " " + x);
            else
                System.out.println(x + " " + y);
        }
    } main {
        BufferedReader line = new BufferedReader(new InputStreamReader(System.in));
        String str = null;
        while ((str = line.readLine()) != null) {
            String[] arr = str.split(" ");
            if ("0".equals(arr[0]) && "0".equals(arr[1]))
                break;
            int x = Integer.parseInt(arr[0]);
            int y = Integer.parseInt(arr[1]);
 
            if (x > y)
                System.out.println(y + " " + x);
            else
                System.out.println(x + " " + y);
        }
    } BufferedReader line = new BufferedReader(new InputStreamReader(System.in)); line new BufferedReader(new InputStreamReader(System.in)) String str = null; str null while ((str = line.readLine()) != null) {
            String[] arr = str.split(" ");
            if ("0".equals(arr[0]) && "0".equals(arr[1]))
                break;
            int x = Integer.parseInt(arr[0]);
            int y = Integer.parseInt(arr[1]);
 
            if (x > y)
                System.out.println(y + " " + x);
            else
                System.out.println(x + " " + y);
        } (str = line.readLine()) != null (str = line.readLine()) str line.readLine() line.readLine line null {
            String[] arr = str.split(" ");
            if ("0".equals(arr[0]) && "0".equals(arr[1]))
                break;
            int x = Integer.parseInt(arr[0]);
            int y = Integer.parseInt(arr[1]);
 
            if (x > y)
                System.out.println(y + " " + x);
            else
                System.out.println(x + " " + y);
        } String[] arr = str.split(" "); arr str.split(" ") str.split str " " if ("0".equals(arr[0]) && "0".equals(arr[1]))
                break; "0".equals(arr[0]) && "0".equals(arr[1]) "0".equals(arr[0]) "0".equals "0" arr[0] arr 0 "0".equals(arr[1]) "0".equals "0" arr[1] arr 1 break; int x = Integer.parseInt(arr[0]); x Integer.parseInt(arr[0]) Integer.parseInt Integer arr[0] arr 0 int y = Integer.parseInt(arr[1]); y Integer.parseInt(arr[1]) Integer.parseInt Integer arr[1] arr 1 if (x > y)
                System.out.println(y + " " + x);
            else
                System.out.println(x + " " + y); x > y x y System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y String[] args args
import java.io.*;
 class Main{
    public static void main(String[] args) throws Exception {
        BufferedReader line = new BufferedReader(new InputStreamReader(System.in));
        String str = null;
        while ((str = line.readLine()) != null) {
            String[] arr = str.split(" ");
            if ("0".equals(arr[0]) && "0".equals(arr[1]))
                break;
            int x = Integer.parseInt(arr[0]);
            int y = Integer.parseInt(arr[1]);
 
            if (x > y)
                System.out.println(y + " " + x);
            else
                System.out.println(x + " " + y);
        }
    }
}