import java.io.*;
 
class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        while(true) {
            String str = br.readLine();
            if(str.equals("0 0")) break;
            int x = Integer.parseInt(str.substring(0, str.indexOf(' ')));
            int y = Integer.parseInt(str.substring(str.indexOf(' ')+1));
            if(x<=y) output.append(x+" "+y+"\n");
            else output.append(y+" "+x+"\n");
        }
        System.out.print(output);
    }
 
} import java.io.*; io.* java class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        while(true) {
            String str = br.readLine();
            if(str.equals("0 0")) break;
            int x = Integer.parseInt(str.substring(0, str.indexOf(' ')));
            int y = Integer.parseInt(str.substring(str.indexOf(' ')+1));
            if(x<=y) output.append(x+" "+y+"\n");
            else output.append(y+" "+x+"\n");
        }
        System.out.print(output);
    }
 
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        while(true) {
            String str = br.readLine();
            if(str.equals("0 0")) break;
            int x = Integer.parseInt(str.substring(0, str.indexOf(' ')));
            int y = Integer.parseInt(str.substring(str.indexOf(' ')+1));
            if(x<=y) output.append(x+" "+y+"\n");
            else output.append(y+" "+x+"\n");
        }
        System.out.print(output);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        while(true) {
            String str = br.readLine();
            if(str.equals("0 0")) break;
            int x = Integer.parseInt(str.substring(0, str.indexOf(' ')));
            int y = Integer.parseInt(str.substring(str.indexOf(' ')+1));
            if(x<=y) output.append(x+" "+y+"\n");
            else output.append(y+" "+x+"\n");
        }
        System.out.print(output);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder output = new StringBuilder(); output new StringBuilder() while(true) {
            String str = br.readLine();
            if(str.equals("0 0")) break;
            int x = Integer.parseInt(str.substring(0, str.indexOf(' ')));
            int y = Integer.parseInt(str.substring(str.indexOf(' ')+1));
            if(x<=y) output.append(x+" "+y+"\n");
            else output.append(y+" "+x+"\n");
        } true {
            String str = br.readLine();
            if(str.equals("0 0")) break;
            int x = Integer.parseInt(str.substring(0, str.indexOf(' ')));
            int y = Integer.parseInt(str.substring(str.indexOf(' ')+1));
            if(x<=y) output.append(x+" "+y+"\n");
            else output.append(y+" "+x+"\n");
        } String str = br.readLine(); str br.readLine() br.readLine br if(str.equals("0 0")) break; str.equals("0 0") str.equals str "0 0" break; int x = Integer.parseInt(str.substring(0, str.indexOf(' '))); x Integer.parseInt(str.substring(0, str.indexOf(' '))) Integer.parseInt Integer str.substring(0, str.indexOf(' ')) str.substring str 0 str.indexOf(' ') str.indexOf str ' ' int y = Integer.parseInt(str.substring(str.indexOf(' ')+1)); y Integer.parseInt(str.substring(str.indexOf(' ')+1)) Integer.parseInt Integer str.substring(str.indexOf(' ')+1) str.substring str str.indexOf(' ')+1 str.indexOf(' ') str.indexOf str ' ' 1 if(x<=y) output.append(x+" "+y+"\n");
            else output.append(y+" "+x+"\n"); x<=y x y output.append(x+" "+y+"\n") output.append output x+" "+y+"\n" y x+" "+y+"\n" x " " y "\n" output.append(y+" "+x+"\n") output.append output y+" "+x+"\n" x y+" "+x+"\n" y " " x "\n" System.out.print(output) System.out.print System.out System System.out output String[] args args
import java.io.*;
 
class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        while(true) {
            String str = br.readLine();
            if(str.equals("0 0")) break;
            int x = Integer.parseInt(str.substring(0, str.indexOf(' ')));
            int y = Integer.parseInt(str.substring(str.indexOf(' ')+1));
            if(x<=y) output.append(x+" "+y+"\n");
            else output.append(y+" "+x+"\n");
        }
        System.out.print(output);
    }
 
}