import java.io.*;

public class Main {
    
    public static void main(String[] args) {
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        try {
            
            boolean flag = true;
            while (flag) {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            }
            
        } catch (NumberFormatException e) {
            
            e.printStackTrace();
            
        } catch (IOException e) {

            e.printStackTrace();

        }
        
    }
    
} import java.io.*; io.* java public class Main {
    
    public static void main(String[] args) {
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        try {
            
            boolean flag = true;
            while (flag) {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            }
            
        } catch (NumberFormatException e) {
            
            e.printStackTrace();
            
        } catch (IOException e) {

            e.printStackTrace();

        }
        
    }
    
} Main public static void main(String[] args) {
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        try {
            
            boolean flag = true;
            while (flag) {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            }
            
        } catch (NumberFormatException e) {
            
            e.printStackTrace();
            
        } catch (IOException e) {

            e.printStackTrace();

        }
        
    } main {
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        try {
            
            boolean flag = true;
            while (flag) {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            }
            
        } catch (NumberFormatException e) {
            
            e.printStackTrace();
            
        } catch (IOException e) {

            e.printStackTrace();

        }
        
    } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) try {
            
            boolean flag = true;
            while (flag) {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            }
            
        } catch (NumberFormatException e) {
            
            e.printStackTrace();
            
        } catch (IOException e) {

            e.printStackTrace();

        } catch (NumberFormatException e) {
            
            e.printStackTrace();
            
        } NumberFormatException e {
            
            e.printStackTrace();
            
        } e.printStackTrace() e.printStackTrace e catch (IOException e) {

            e.printStackTrace();

        } IOException e {

            e.printStackTrace();

        } e.printStackTrace() e.printStackTrace e {
            
            boolean flag = true;
            while (flag) {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            }
            
        } boolean flag = true; flag true while (flag) {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            } flag {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            } String[] line = reader.readLine().split(" "); line reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " int x = Integer.parseInt(line[0]); x Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int y = Integer.parseInt(line[1]); y Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 final int END = 0; END 0 if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                } x == END && y == END x == END x END y == END y END {
                    flag = false;
                } flag = false flag false {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                } int big   = Math.max(x, y); big Math.max(x, y) Math.max Math x y int small = Math.min(x, y); small Math.min(x, y) Math.min Math x y System.out.println(small + " " + big) System.out.println System.out System System.out small + " " + big small + " " + big small " " big String[] args args public class Main {
    
    public static void main(String[] args) {
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        try {
            
            boolean flag = true;
            while (flag) {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            }
            
        } catch (NumberFormatException e) {
            
            e.printStackTrace();
            
        } catch (IOException e) {

            e.printStackTrace();

        }
        
    }
    
} public class Main {
    
    public static void main(String[] args) {
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        try {
            
            boolean flag = true;
            while (flag) {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            }
            
        } catch (NumberFormatException e) {
            
            e.printStackTrace();
            
        } catch (IOException e) {

            e.printStackTrace();

        }
        
    }
    
} Main
import java.io.*;

public class Main {
    
    public static void main(String[] args) {
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        try {
            
            boolean flag = true;
            while (flag) {
                
                String[] line = reader.readLine().split(" ");
                int x = Integer.parseInt(line[0]);
                int y = Integer.parseInt(line[1]);
                final int END = 0;
                
                if (x == END && y == END) {
                    flag = false;
                } else {
                    int big   = Math.max(x, y);
                    int small = Math.min(x, y);
                    System.out.println(small + " " + big);
                }
                
            }
            
        } catch (NumberFormatException e) {
            
            e.printStackTrace();
            
        } catch (IOException e) {

            e.printStackTrace();

        }
        
    }
    
}