import java.io.*;

class Main{
    public static void main(String[] args){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {       
                int[] x = new int[10000];
                int[] y = new int[10000];
                int a = 0, b = 0;

                while(2 > 1){
                    String line = reader.readLine();
                    String[] strAry = line.split(" ");

                    x[a] = Integer.parseInt(strAry[0]);
                    y[a] = Integer.parseInt(strAry[1]);

                    if(x[a] == 0 && y[a] == 0){
                        break;
                    }
                    a += 1;

                }


                for(int i = 0; i < a; i++){
                    if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    }
                    System.out.println(x[i] + " " + y[i]);
                }
                
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        }
    }
} import java.io.*; io.* java class Main{
    public static void main(String[] args){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {       
                int[] x = new int[10000];
                int[] y = new int[10000];
                int a = 0, b = 0;

                while(2 > 1){
                    String line = reader.readLine();
                    String[] strAry = line.split(" ");

                    x[a] = Integer.parseInt(strAry[0]);
                    y[a] = Integer.parseInt(strAry[1]);

                    if(x[a] == 0 && y[a] == 0){
                        break;
                    }
                    a += 1;

                }


                for(int i = 0; i < a; i++){
                    if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    }
                    System.out.println(x[i] + " " + y[i]);
                }
                
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        }
    }
} Main public static void main(String[] args){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {       
                int[] x = new int[10000];
                int[] y = new int[10000];
                int a = 0, b = 0;

                while(2 > 1){
                    String line = reader.readLine();
                    String[] strAry = line.split(" ");

                    x[a] = Integer.parseInt(strAry[0]);
                    y[a] = Integer.parseInt(strAry[1]);

                    if(x[a] == 0 && y[a] == 0){
                        break;
                    }
                    a += 1;

                }


                for(int i = 0; i < a; i++){
                    if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    }
                    System.out.println(x[i] + " " + y[i]);
                }
                
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        }
    } main {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {       
                int[] x = new int[10000];
                int[] y = new int[10000];
                int a = 0, b = 0;

                while(2 > 1){
                    String line = reader.readLine();
                    String[] strAry = line.split(" ");

                    x[a] = Integer.parseInt(strAry[0]);
                    y[a] = Integer.parseInt(strAry[1]);

                    if(x[a] == 0 && y[a] == 0){
                        break;
                    }
                    a += 1;

                }


                for(int i = 0; i < a; i++){
                    if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    }
                    System.out.println(x[i] + " " + y[i]);
                }
                
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        }
    } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) try {       
                int[] x = new int[10000];
                int[] y = new int[10000];
                int a = 0, b = 0;

                while(2 > 1){
                    String line = reader.readLine();
                    String[] strAry = line.split(" ");

                    x[a] = Integer.parseInt(strAry[0]);
                    y[a] = Integer.parseInt(strAry[1]);

                    if(x[a] == 0 && y[a] == 0){
                        break;
                    }
                    a += 1;

                }


                for(int i = 0; i < a; i++){
                    if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    }
                    System.out.println(x[i] + " " + y[i]);
                }
                
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        } IOException e {
            //TODO: handle exception
            System.out.println(e);
        } System.out.println(e) System.out.println System.out System System.out e {       
                int[] x = new int[10000];
                int[] y = new int[10000];
                int a = 0, b = 0;

                while(2 > 1){
                    String line = reader.readLine();
                    String[] strAry = line.split(" ");

                    x[a] = Integer.parseInt(strAry[0]);
                    y[a] = Integer.parseInt(strAry[1]);

                    if(x[a] == 0 && y[a] == 0){
                        break;
                    }
                    a += 1;

                }


                for(int i = 0; i < a; i++){
                    if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    }
                    System.out.println(x[i] + " " + y[i]);
                }
                
        } int[] x = new int[10000]; x new int[10000] 10000 int[] y = new int[10000]; y new int[10000] 10000 int a = 0 a 0 b = 0; b 0 while(2 > 1){
                    String line = reader.readLine();
                    String[] strAry = line.split(" ");

                    x[a] = Integer.parseInt(strAry[0]);
                    y[a] = Integer.parseInt(strAry[1]);

                    if(x[a] == 0 && y[a] == 0){
                        break;
                    }
                    a += 1;

                } 2 > 1 2 1 {
                    String line = reader.readLine();
                    String[] strAry = line.split(" ");

                    x[a] = Integer.parseInt(strAry[0]);
                    y[a] = Integer.parseInt(strAry[1]);

                    if(x[a] == 0 && y[a] == 0){
                        break;
                    }
                    a += 1;

                } String line = reader.readLine(); line reader.readLine() reader.readLine reader String[] strAry = line.split(" "); strAry line.split(" ") line.split line " " x[a] = Integer.parseInt(strAry[0]) x[a] x a Integer.parseInt(strAry[0]) Integer.parseInt Integer strAry[0] strAry 0 y[a] = Integer.parseInt(strAry[1]) y[a] y a Integer.parseInt(strAry[1]) Integer.parseInt Integer strAry[1] strAry 1 if(x[a] == 0 && y[a] == 0){
                        break;
                    } x[a] == 0 && y[a] == 0 x[a] == 0 x[a] x a 0 y[a] == 0 y[a] y a 0 {
                        break;
                    } break; a += 1 a 1 for(int i = 0; i < a; i++){
                    if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    }
                    System.out.println(x[i] + " " + y[i]);
                } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
                    if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    }
                    System.out.println(x[i] + " " + y[i]);
                } {
                    if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    }
                    System.out.println(x[i] + " " + y[i]);
                } if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    } x[i] > y[i] x[i] x i y[i] y i {
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    } b = y[i] b y[i] y i y[i] = x[i] y[i] y i x[i] x i x[i] = b x[i] x i b System.out.println(x[i] + " " + y[i]) System.out.println System.out System System.out x[i] + " " + y[i] x[i] + " " + y[i] x[i] x i " " y[i] y i String[] args args
import java.io.*;

class Main{
    public static void main(String[] args){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {       
                int[] x = new int[10000];
                int[] y = new int[10000];
                int a = 0, b = 0;

                while(2 > 1){
                    String line = reader.readLine();
                    String[] strAry = line.split(" ");

                    x[a] = Integer.parseInt(strAry[0]);
                    y[a] = Integer.parseInt(strAry[1]);

                    if(x[a] == 0 && y[a] == 0){
                        break;
                    }
                    a += 1;

                }


                for(int i = 0; i < a; i++){
                    if(x[i] > y[i]){
                        b = y[i];
                        y[i] = x[i];
                        x[i] = b;
                    }
                    System.out.println(x[i] + " " + y[i]);
                }
                
        } catch (IOException e) {
            //TODO: handle exception
            System.out.println(e);
        }
    }
}