import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    
    private final static String SPACE = " ";
    
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(
                    new InputStreamReader(System.in));
            
            String sStr;
            while ((sStr = stdReader.readLine()) != null) {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            }
            
            stdReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    
    private final static String SPACE = " ";
    
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(
                    new InputStreamReader(System.in));
            
            String sStr;
            while ((sStr = stdReader.readLine()) != null) {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            }
            
            stdReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
    }
} Main private final static String SPACE = " "; SPACE " " public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(
                    new InputStreamReader(System.in));
            
            String sStr;
            while ((sStr = stdReader.readLine()) != null) {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            }
            
            stdReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
    } main {
        try {
            BufferedReader stdReader = new BufferedReader(
                    new InputStreamReader(System.in));
            
            String sStr;
            while ((sStr = stdReader.readLine()) != null) {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            }
            
            stdReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
    } try {
            BufferedReader stdReader = new BufferedReader(
                    new InputStreamReader(System.in));
            
            String sStr;
            while ((sStr = stdReader.readLine()) != null) {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            }
            
            stdReader.close();
        } catch (Exception e) {
            System.exit(-1);
        } catch (Exception e) {
            System.exit(-1);
        } Exception e {
            System.exit(-1);
        } System.exit(-1) System.exit System -1 1 {
            BufferedReader stdReader = new BufferedReader(
                    new InputStreamReader(System.in));
            
            String sStr;
            while ((sStr = stdReader.readLine()) != null) {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            }
            
            stdReader.close();
        } BufferedReader stdReader = new BufferedReader(
                    new InputStreamReader(System.in)); stdReader new BufferedReader(
                    new InputStreamReader(System.in)) String sStr; sStr while ((sStr = stdReader.readLine()) != null) {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            } (sStr = stdReader.readLine()) != null (sStr = stdReader.readLine()) sStr stdReader.readLine() stdReader.readLine stdReader null {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            } String[] inputs = sStr.split(" "); inputs sStr.split(" ") sStr.split sStr " " int x = Integer.valueOf(inputs[0]); x Integer.valueOf(inputs[0]) Integer.valueOf Integer inputs[0] inputs 0 int y = Integer.valueOf(inputs[1]); y Integer.valueOf(inputs[1]) Integer.valueOf Integer inputs[1] inputs 1 if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                } x < y x y {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } System.out.print(x) System.out.print System.out System System.out x System.out.print(SPACE) System.out.print System.out System System.out SPACE System.out.print(y) System.out.print System.out System System.out y System.out.println() System.out.println System.out System System.out if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                    break;
                    // nothing to do
                } break; {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                } System.out.print(y) System.out.print System.out System System.out y System.out.print(SPACE) System.out.print System.out System System.out SPACE System.out.print(x) System.out.print System.out System System.out x System.out.println() System.out.println System.out System System.out stdReader.close() stdReader.close stdReader String[] args args public class Main {
    
    private final static String SPACE = " ";
    
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(
                    new InputStreamReader(System.in));
            
            String sStr;
            while ((sStr = stdReader.readLine()) != null) {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            }
            
            stdReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
    }
} public class Main {
    
    private final static String SPACE = " ";
    
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(
                    new InputStreamReader(System.in));
            
            String sStr;
            while ((sStr = stdReader.readLine()) != null) {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            }
            
            stdReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    
    private final static String SPACE = " ";
    
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(
                    new InputStreamReader(System.in));
            
            String sStr;
            while ((sStr = stdReader.readLine()) != null) {
                String[] inputs = sStr.split(" ");
                
                int x = Integer.valueOf(inputs[0]);
                int y = Integer.valueOf(inputs[1]);
                
                if (x < y) {
                    System.out.print(x);
                    System.out.print(SPACE);
                    System.out.print(y);
                    System.out.println();
                } else if (x == 0 && y == 0) {
                    break;
                    // nothing to do
                } else {
                    System.out.print(y);
                    System.out.print(SPACE);
                    System.out.print(x);
                    System.out.println();
                }
            }
            
            stdReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
    }
}