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

class Main {

	public static void main(String[] args) {


        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String inputData;
            StringBuilder sb = new StringBuilder();
            while(true){
	            inputData = reader.readLine();
	            if("0 0".equals(inputData)){
	            	break;
	            }else{
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            }
            }
            System.out.print(sb.toString());

        } catch (IOException e) {
            e.printStackTrace();
        }
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {

	public static void main(String[] args) {


        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String inputData;
            StringBuilder sb = new StringBuilder();
            while(true){
	            inputData = reader.readLine();
	            if("0 0".equals(inputData)){
	            	break;
	            }else{
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            }
            }
            System.out.print(sb.toString());

        } catch (IOException e) {
            e.printStackTrace();
        }
	}

} Main public static void main(String[] args) {


        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String inputData;
            StringBuilder sb = new StringBuilder();
            while(true){
	            inputData = reader.readLine();
	            if("0 0".equals(inputData)){
	            	break;
	            }else{
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            }
            }
            System.out.print(sb.toString());

        } catch (IOException e) {
            e.printStackTrace();
        }
	} main {


        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String inputData;
            StringBuilder sb = new StringBuilder();
            while(true){
	            inputData = reader.readLine();
	            if("0 0".equals(inputData)){
	            	break;
	            }else{
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            }
            }
            System.out.print(sb.toString());

        } catch (IOException e) {
            e.printStackTrace();
        }
	} try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String inputData;
            StringBuilder sb = new StringBuilder();
            while(true){
	            inputData = reader.readLine();
	            if("0 0".equals(inputData)){
	            	break;
	            }else{
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            }
            }
            System.out.print(sb.toString());

        } catch (IOException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String inputData;
            StringBuilder sb = new StringBuilder();
            while(true){
	            inputData = reader.readLine();
	            if("0 0".equals(inputData)){
	            	break;
	            }else{
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            }
            }
            System.out.print(sb.toString());

        } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String inputData; inputData StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(true){
	            inputData = reader.readLine();
	            if("0 0".equals(inputData)){
	            	break;
	            }else{
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            }
            } true {
	            inputData = reader.readLine();
	            if("0 0".equals(inputData)){
	            	break;
	            }else{
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            }
            } inputData = reader.readLine() inputData reader.readLine() reader.readLine reader if("0 0".equals(inputData)){
	            	break;
	            }else{
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            } "0 0".equals(inputData) "0 0".equals "0 0" inputData {
	            	break;
	            } break; {
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            } String[] strNumber = inputData.split(" "); strNumber inputData.split(" ") inputData.split inputData " " int a = Integer.parseInt(strNumber[0]); a Integer.parseInt(strNumber[0]) Integer.parseInt Integer strNumber[0] strNumber 0 int b = Integer.parseInt(strNumber[1]); b Integer.parseInt(strNumber[1]) Integer.parseInt Integer strNumber[1] strNumber 1 if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					} a > b a b {
						sb.append(b + " " + a);
					} sb.append(b + " " + a) sb.append sb b + " " + a b + " " + a b " " a {
						sb.append(a + " " + b);
					} sb.append(a + " " + b) sb.append sb a + " " + b a + " " + b a " " b sb.append(System.getProperty("line.separator")) sb.append sb System.getProperty("line.separator") System.getProperty System "line.separator" System.out.print(sb.toString()) System.out.print System.out System System.out sb.toString() sb.toString sb String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {

	public static void main(String[] args) {


        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String inputData;
            StringBuilder sb = new StringBuilder();
            while(true){
	            inputData = reader.readLine();
	            if("0 0".equals(inputData)){
	            	break;
	            }else{
					String[] strNumber = inputData.split(" ");
					int a = Integer.parseInt(strNumber[0]);
					int b = Integer.parseInt(strNumber[1]);
					if(a > b){
						sb.append(b + " " + a);
					}else{
						sb.append(a + " " + b);
					}
					sb.append(System.getProperty("line.separator"));
	            }
            }
            System.out.print(sb.toString());

        } catch (IOException e) {
            e.printStackTrace();
        }
	}

}