import java.io.*;

public class Main {
    public static void main(String[] args) {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        try {
            while(true) {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            }
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
} import java.io.*; io.* java public class Main {
    public static void main(String[] args) {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        try {
            while(true) {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            }
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
} Main public static void main(String[] args) {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        try {
            while(true) {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            }
        } catch(IOException e) {
            e.printStackTrace();
        }
    } main {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        try {
            while(true) {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            }
        } catch(IOException e) {
            e.printStackTrace();
        }
    } InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) try {
            while(true) {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            }
        } catch(IOException e) {
            e.printStackTrace();
        } catch(IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            while(true) {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            }
        } while(true) {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            } true {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            } String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int x = Integer.parseInt(str[0]); x Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int y = Integer.parseInt(str[1]); y Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 if(x == 0 && y == 0) {
                    break;
                } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
                    break;
                } break; System.out.println((x < y ? x : y) + " " + (x > y ? x : y)) System.out.println System.out System System.out (x < y ? x : y) + " " + (x > y ? x : y) (x < y ? x : y) + " " + (x > y ? x : y) (x < y ? x : y) x < y x y x y " " (x > y ? x : y) x > y x y x y String[] args args public class Main {
    public static void main(String[] args) {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        try {
            while(true) {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            }
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
} public class Main {
    public static void main(String[] args) {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        try {
            while(true) {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            }
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
} Main
import java.io.*;

public class Main {
    public static void main(String[] args) {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        try {
            while(true) {
                String[] str = br.readLine().split(" ");
                int x = Integer.parseInt(str[0]);
                int y = Integer.parseInt(str[1]);
                if(x == 0 && y == 0) {
                    break;
                }
                System.out.println((x < y ? x : y) + " " + (x > y ? x : y));
            }
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
}