import java.io.*;

class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb.toString());
	}
} import java.io.*; io.* java class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb.toString());
	}
} Main public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb.toString());
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb.toString());
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		} true {
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		} String[] array = br.readLine().split(" "); array br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int x = Integer.parseInt(array[0]); x Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 int y = Integer.parseInt(array[1]); y Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        } x==0&&y==0 x==0 x 0 y==0 y 0 {
	        	break;
	        } break; if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        } x>y x y {
	        	sb.append(y+" "+x+"\n");
	        } sb.append(y+" "+x+"\n") sb.append sb y+" "+x+"\n" x y+" "+x+"\n" y " " x "\n" {
	        	sb.append(x+" "+y+"\n");
	        } sb.append(x+" "+y+"\n") sb.append sb x+" "+y+"\n" y x+" "+y+"\n" x " " y "\n" System.out.print(sb.toString()) System.out.print System.out System System.out sb.toString() sb.toString sb String[] args args
import java.io.*;

class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] array = br.readLine().split(" ");
	        int x = Integer.parseInt(array[0]);
	        int y = Integer.parseInt(array[1]);
	        if(x==0&&y==0){
	        	break;
	        }else if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		}
		System.out.print(sb.toString());
	}
}