import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Math;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder st = new StringBuilder();
        
        String[] ary = new String[2];
        int[] num = new int[2];
        
        while(true){
            ary = br.readLine().split(" ");
            //ary = inputStr.split(" ");
            num[0] = Integer.parseInt(ary[0]);
            num[1] = Integer.parseInt(ary[1]);
            
            if(num[0] == 0 && num[1] == 0){
                break;
            }
            
            System.out.println(Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]));
        }
        
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.lang.Math; Math java.lang public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder st = new StringBuilder();
        
        String[] ary = new String[2];
        int[] num = new int[2];
        
        while(true){
            ary = br.readLine().split(" ");
            //ary = inputStr.split(" ");
            num[0] = Integer.parseInt(ary[0]);
            num[1] = Integer.parseInt(ary[1]);
            
            if(num[0] == 0 && num[1] == 0){
                break;
            }
            
            System.out.println(Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]));
        }
        
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder st = new StringBuilder();
        
        String[] ary = new String[2];
        int[] num = new int[2];
        
        while(true){
            ary = br.readLine().split(" ");
            //ary = inputStr.split(" ");
            num[0] = Integer.parseInt(ary[0]);
            num[1] = Integer.parseInt(ary[1]);
            
            if(num[0] == 0 && num[1] == 0){
                break;
            }
            
            System.out.println(Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]));
        }
        
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder st = new StringBuilder();
        
        String[] ary = new String[2];
        int[] num = new int[2];
        
        while(true){
            ary = br.readLine().split(" ");
            //ary = inputStr.split(" ");
            num[0] = Integer.parseInt(ary[0]);
            num[1] = Integer.parseInt(ary[1]);
            
            if(num[0] == 0 && num[1] == 0){
                break;
            }
            
            System.out.println(Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]));
        }
        
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder st = new StringBuilder(); st new StringBuilder() String[] ary = new String[2]; ary new String[2] 2 int[] num = new int[2]; num new int[2] 2 while(true){
            ary = br.readLine().split(" ");
            //ary = inputStr.split(" ");
            num[0] = Integer.parseInt(ary[0]);
            num[1] = Integer.parseInt(ary[1]);
            
            if(num[0] == 0 && num[1] == 0){
                break;
            }
            
            System.out.println(Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]));
        } true {
            ary = br.readLine().split(" ");
            //ary = inputStr.split(" ");
            num[0] = Integer.parseInt(ary[0]);
            num[1] = Integer.parseInt(ary[1]);
            
            if(num[0] == 0 && num[1] == 0){
                break;
            }
            
            System.out.println(Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]));
        } ary = br.readLine().split(" ") ary br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " num[0] = Integer.parseInt(ary[0]) num[0] num 0 Integer.parseInt(ary[0]) Integer.parseInt Integer ary[0] ary 0 num[1] = Integer.parseInt(ary[1]) num[1] num 1 Integer.parseInt(ary[1]) Integer.parseInt Integer ary[1] ary 1 if(num[0] == 0 && num[1] == 0){
                break;
            } num[0] == 0 && num[1] == 0 num[0] == 0 num[0] num 0 0 num[1] == 0 num[1] num 1 0 {
                break;
            } break; System.out.println(Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1])) System.out.println System.out System System.out Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]) Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]) Math.min(num[0], num[1]) Math.min Math num[0] num 0 num[1] num 1 " " Math.max(num[0], num[1]) Math.max Math num[0] num 0 num[1] num 1 String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder st = new StringBuilder();
        
        String[] ary = new String[2];
        int[] num = new int[2];
        
        while(true){
            ary = br.readLine().split(" ");
            //ary = inputStr.split(" ");
            num[0] = Integer.parseInt(ary[0]);
            num[1] = Integer.parseInt(ary[1]);
            
            if(num[0] == 0 && num[1] == 0){
                break;
            }
            
            System.out.println(Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]));
        }
        
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder st = new StringBuilder();
        
        String[] ary = new String[2];
        int[] num = new int[2];
        
        while(true){
            ary = br.readLine().split(" ");
            //ary = inputStr.split(" ");
            num[0] = Integer.parseInt(ary[0]);
            num[1] = Integer.parseInt(ary[1]);
            
            if(num[0] == 0 && num[1] == 0){
                break;
            }
            
            System.out.println(Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]));
        }
        
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Math;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder st = new StringBuilder();
        
        String[] ary = new String[2];
        int[] num = new int[2];
        
        while(true){
            ary = br.readLine().split(" ");
            //ary = inputStr.split(" ");
            num[0] = Integer.parseInt(ary[0]);
            num[1] = Integer.parseInt(ary[1]);
            
            if(num[0] == 0 && num[1] == 0){
                break;
            }
            
            System.out.println(Math.min(num[0], num[1]) + " " + Math.max(num[0], num[1]));
        }
        
    }
}