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

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int x,y,temp;
        while(true){
            String str[] = br.readLine().split(" ");
            x = Integer.parseInt(str[0]);
            y = Integer.parseInt(str[1]);
            if(x == 0 && y == 0) break;
            if(x > y){
                temp = y;
                y = x;
                x = temp;
            }
            sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
        System.out.print(sb);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int x,y,temp;
        while(true){
            String str[] = br.readLine().split(" ");
            x = Integer.parseInt(str[0]);
            y = Integer.parseInt(str[1]);
            if(x == 0 && y == 0) break;
            if(x > y){
                temp = y;
                y = x;
                x = temp;
            }
            sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
        System.out.print(sb);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int x,y,temp;
        while(true){
            String str[] = br.readLine().split(" ");
            x = Integer.parseInt(str[0]);
            y = Integer.parseInt(str[1]);
            if(x == 0 && y == 0) break;
            if(x > y){
                temp = y;
                y = x;
                x = temp;
            }
            sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
        System.out.print(sb);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int x,y,temp;
        while(true){
            String str[] = br.readLine().split(" ");
            x = Integer.parseInt(str[0]);
            y = Integer.parseInt(str[1]);
            if(x == 0 && y == 0) break;
            if(x > y){
                temp = y;
                y = x;
                x = temp;
            }
            sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
        System.out.print(sb);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int x x y y temp; temp while(true){
            String str[] = br.readLine().split(" ");
            x = Integer.parseInt(str[0]);
            y = Integer.parseInt(str[1]);
            if(x == 0 && y == 0) break;
            if(x > y){
                temp = y;
                y = x;
                x = temp;
            }
            sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        } true {
            String str[] = br.readLine().split(" ");
            x = Integer.parseInt(str[0]);
            y = Integer.parseInt(str[1]);
            if(x == 0 && y == 0) break;
            if(x > y){
                temp = y;
                y = x;
                x = temp;
            }
            sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        } String str[] = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " x = Integer.parseInt(str[0]) x Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 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; if(x > y){
                temp = y;
                y = x;
                x = temp;
            } x > y x y {
                temp = y;
                y = x;
                x = temp;
            } temp = y temp y y = x y x x = temp x temp sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n") sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)) sb.append(Integer.toString(x)).append(" ").append sb.append(Integer.toString(x)).append(" ") sb.append(Integer.toString(x)).append sb.append(Integer.toString(x)) sb.append sb Integer.toString(x) Integer.toString Integer x " " Integer.toString(y) Integer.toString Integer y "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int x,y,temp;
        while(true){
            String str[] = br.readLine().split(" ");
            x = Integer.parseInt(str[0]);
            y = Integer.parseInt(str[1]);
            if(x == 0 && y == 0) break;
            if(x > y){
                temp = y;
                y = x;
                x = temp;
            }
            sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
        System.out.print(sb);
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int x,y,temp;
        while(true){
            String str[] = br.readLine().split(" ");
            x = Integer.parseInt(str[0]);
            y = Integer.parseInt(str[1]);
            if(x == 0 && y == 0) break;
            if(x > y){
                temp = y;
                y = x;
                x = temp;
            }
            sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
        System.out.print(sb);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int x,y,temp;
        while(true){
            String str[] = br.readLine().split(" ");
            x = Integer.parseInt(str[0]);
            y = Integer.parseInt(str[1]);
            if(x == 0 && y == 0) break;
            if(x > y){
                temp = y;
                y = x;
                x = temp;
            }
            sb.append(Integer.toString(x)).append(" ").append(Integer.toString(y)).append("\n");
        }
        System.out.print(sb);
    }
}