import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Math;

public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 1;
            while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            }
            stdReader.close();
        } catch(Exception e) {
            e.getStackTrace();
            System.exit(-1);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.lang.Math; Math java.lang public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 1;
            while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            }
            stdReader.close();
        } catch(Exception e) {
            e.getStackTrace();
            System.exit(-1);
        }
    }
} Main public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 1;
            while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            }
            stdReader.close();
        } catch(Exception e) {
            e.getStackTrace();
            System.exit(-1);
        }
    } main {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 1;
            while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            }
            stdReader.close();
        } catch(Exception e) {
            e.getStackTrace();
            System.exit(-1);
        }
    } try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 1;
            while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            }
            stdReader.close();
        } catch(Exception e) {
            e.getStackTrace();
            System.exit(-1);
        } catch(Exception e) {
            e.getStackTrace();
            System.exit(-1);
        } Exception e {
            e.getStackTrace();
            System.exit(-1);
        } e.getStackTrace() e.getStackTrace e System.exit(-1) System.exit System -1 1 {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 1;
            while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            }
            stdReader.close();
        } BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in)); stdReader new BufferedReader(new InputStreamReader(System.in)) String line; line int count = 1; count 1 while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            } (line = stdReader.readLine()) != null (line = stdReader.readLine()) line stdReader.readLine() stdReader.readLine stdReader null {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            } String[] input = line.split(" ", 0); input line.split(" ", 0) line.split line " " 0 int x = Integer.parseInt(input[0]); x Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 int y = Integer.parseInt(input[1]); y Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 if(x == 0 && y == 0) {
                    break;
                } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                    break;
                } break; if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                } x > y x y {
                    int temp = x;
                    x = y;
                    y = temp;
                } int temp = x; temp x x = y x y y = temp y temp System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y stdReader.close() stdReader.close stdReader String[] args args public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 1;
            while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            }
            stdReader.close();
        } catch(Exception e) {
            e.getStackTrace();
            System.exit(-1);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 1;
            while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            }
            stdReader.close();
        } catch(Exception e) {
            e.getStackTrace();
            System.exit(-1);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Math;

public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 1;
            while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                
                int x = Integer.parseInt(input[0]);
                int y = Integer.parseInt(input[1]);
                
                // x ??¨ y ????????????0?????´????????????
                if(x == 0 && y == 0) {
                    break;
                }
                
                // x ??¨ y????????????????°???????????????????????????? (????§???????????????§??????) 
                if(x > y) {
                    int temp = x;
                    x = y;
                    y = temp;
                }
                
                System.out.println(x + " " + y);
                
                
            }
            stdReader.close();
        } catch(Exception e) {
            e.getStackTrace();
            System.exit(-1);
        }
    }
}