import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        int[] s = new int[2];
        while(true){
        	String[] input = br.readLine().split(" ");
            int x = Integer.parseInt(input[0]);
            int y = Integer.parseInt(input[1]);
            if(x == 0 && y == 0){
            	break;
            }
            s[0] = x;
            s[1] = y;
            Arrays.sort(s);
            System.out.println(s[0] + " " + s[1] );
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {
    public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        int[] s = new int[2];
        while(true){
        	String[] input = br.readLine().split(" ");
            int x = Integer.parseInt(input[0]);
            int y = Integer.parseInt(input[1]);
            if(x == 0 && y == 0){
            	break;
            }
            s[0] = x;
            s[1] = y;
            Arrays.sort(s);
            System.out.println(s[0] + " " + s[1] );
        }
    }
} Main public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        int[] s = new int[2];
        while(true){
        	String[] input = br.readLine().split(" ");
            int x = Integer.parseInt(input[0]);
            int y = Integer.parseInt(input[1]);
            if(x == 0 && y == 0){
            	break;
            }
            s[0] = x;
            s[1] = y;
            Arrays.sort(s);
            System.out.println(s[0] + " " + s[1] );
        }
    } main {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        int[] s = new int[2];
        while(true){
        	String[] input = br.readLine().split(" ");
            int x = Integer.parseInt(input[0]);
            int y = Integer.parseInt(input[1]);
            if(x == 0 && y == 0){
            	break;
            }
            s[0] = x;
            s[1] = y;
            Arrays.sort(s);
            System.out.println(s[0] + " " + s[1] );
        }
    } InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) int[] s = new int[2]; s new int[2] 2 while(true){
        	String[] input = br.readLine().split(" ");
            int x = Integer.parseInt(input[0]);
            int y = Integer.parseInt(input[1]);
            if(x == 0 && y == 0){
            	break;
            }
            s[0] = x;
            s[1] = y;
            Arrays.sort(s);
            System.out.println(s[0] + " " + s[1] );
        } true {
        	String[] input = br.readLine().split(" ");
            int x = Integer.parseInt(input[0]);
            int y = Integer.parseInt(input[1]);
            if(x == 0 && y == 0){
            	break;
            }
            s[0] = x;
            s[1] = y;
            Arrays.sort(s);
            System.out.println(s[0] + " " + s[1] );
        } String[] input = br.readLine().split(" "); input br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int x = Integer.parseInt(input[0]); x Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 int y = Integer.parseInt(input[1]); y Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 if(x == 0 && y == 0){
            	break;
            } x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
            	break;
            } break; s[0] = x s[0] s 0 x s[1] = y s[1] s 1 y Arrays.sort(s) Arrays.sort Arrays s System.out.println(s[0] + " " + s[1] ) System.out.println System.out System System.out s[0] + " " + s[1] s[0] + " " + s[1] s[0] s 0 " " s[1] s 1 String[] args args public class Main {
    public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        int[] s = new int[2];
        while(true){
        	String[] input = br.readLine().split(" ");
            int x = Integer.parseInt(input[0]);
            int y = Integer.parseInt(input[1]);
            if(x == 0 && y == 0){
            	break;
            }
            s[0] = x;
            s[1] = y;
            Arrays.sort(s);
            System.out.println(s[0] + " " + s[1] );
        }
    }
} public class Main {
    public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        int[] s = new int[2];
        while(true){
        	String[] input = br.readLine().split(" ");
            int x = Integer.parseInt(input[0]);
            int y = Integer.parseInt(input[1]);
            if(x == 0 && y == 0){
            	break;
            }
            s[0] = x;
            s[1] = y;
            Arrays.sort(s);
            System.out.println(s[0] + " " + s[1] );
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main(String[] args)throws Exception {
    	InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        int[] s = new int[2];
        while(true){
        	String[] input = br.readLine().split(" ");
            int x = Integer.parseInt(input[0]);
            int y = Integer.parseInt(input[1]);
            if(x == 0 && y == 0){
            	break;
            }
            s[0] = x;
            s[1] = y;
            Arrays.sort(s);
            System.out.println(s[0] + " " + s[1] );
        }
    }
}