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));
		int a,b;

		StringBuilder sb = new StringBuilder();
		while(true){
			String[] spl = br.readLine().split(" ");
            a=Integer.parseInt(spl[0]);
            b=Integer.parseInt(spl[1]);

            if(a==0 && b==0){
            	break;
            }
            else if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).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));
		int a,b;

		StringBuilder sb = new StringBuilder();
		while(true){
			String[] spl = br.readLine().split(" ");
            a=Integer.parseInt(spl[0]);
            b=Integer.parseInt(spl[1]);

            if(a==0 && b==0){
            	break;
            }
            else if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).append("\n");
            }


		}
		System.out.print(sb);
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int a,b;

		StringBuilder sb = new StringBuilder();
		while(true){
			String[] spl = br.readLine().split(" ");
            a=Integer.parseInt(spl[0]);
            b=Integer.parseInt(spl[1]);

            if(a==0 && b==0){
            	break;
            }
            else if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).append("\n");
            }


		}
		System.out.print(sb);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int a,b;

		StringBuilder sb = new StringBuilder();
		while(true){
			String[] spl = br.readLine().split(" ");
            a=Integer.parseInt(spl[0]);
            b=Integer.parseInt(spl[1]);

            if(a==0 && b==0){
            	break;
            }
            else if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).append("\n");
            }


		}
		System.out.print(sb);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int a a b; b StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(true){
			String[] spl = br.readLine().split(" ");
            a=Integer.parseInt(spl[0]);
            b=Integer.parseInt(spl[1]);

            if(a==0 && b==0){
            	break;
            }
            else if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).append("\n");
            }


		} true {
			String[] spl = br.readLine().split(" ");
            a=Integer.parseInt(spl[0]);
            b=Integer.parseInt(spl[1]);

            if(a==0 && b==0){
            	break;
            }
            else if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).append("\n");
            }


		} String[] spl = br.readLine().split(" "); spl br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " a=Integer.parseInt(spl[0]) a Integer.parseInt(spl[0]) Integer.parseInt Integer spl[0] spl 0 b=Integer.parseInt(spl[1]) b Integer.parseInt(spl[1]) Integer.parseInt Integer spl[1] spl 1 if(a==0 && b==0){
            	break;
            }
            else if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).append("\n");
            } a==0 && b==0 a==0 a 0 b==0 b 0 {
            	break;
            } break; if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).append("\n");
            } a>b a b {
            	sb.append(b).append(" ").append(a).append("\n");
            } sb.append(b).append(" ").append(a).append("\n") sb.append(b).append(" ").append(a).append sb.append(b).append(" ").append(a) sb.append(b).append(" ").append sb.append(b).append(" ") sb.append(b).append sb.append(b) sb.append sb b " " a "\n" {
            	sb.append(a).append(" ").append(b).append("\n");
            } sb.append(a).append(" ").append(b).append("\n") sb.append(a).append(" ").append(b).append sb.append(a).append(" ").append(b) sb.append(a).append(" ").append sb.append(a).append(" ") sb.append(a).append sb.append(a) sb.append sb a " " b "\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));
		int a,b;

		StringBuilder sb = new StringBuilder();
		while(true){
			String[] spl = br.readLine().split(" ");
            a=Integer.parseInt(spl[0]);
            b=Integer.parseInt(spl[1]);

            if(a==0 && b==0){
            	break;
            }
            else if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).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));
		int a,b;

		StringBuilder sb = new StringBuilder();
		while(true){
			String[] spl = br.readLine().split(" ");
            a=Integer.parseInt(spl[0]);
            b=Integer.parseInt(spl[1]);

            if(a==0 && b==0){
            	break;
            }
            else if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).append("\n");
            }


		}
		System.out.print(sb);
	}
} Main
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));
		int a,b;

		StringBuilder sb = new StringBuilder();
		while(true){
			String[] spl = br.readLine().split(" ");
            a=Integer.parseInt(spl[0]);
            b=Integer.parseInt(spl[1]);

            if(a==0 && b==0){
            	break;
            }
            else if(a>b){
            	sb.append(b).append(" ").append(a).append("\n");
            }else{
            	sb.append(a).append(" ").append(b).append("\n");
            }


		}
		System.out.print(sb);
	}
}