/*AOJ-ITP-3-3*/

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

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