import java.util.Scanner;

class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			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);
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			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);
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			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);
	} main {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			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);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0&&y==0){
				break;
			}else if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		} true {
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0&&y==0){
				break;
			}else if(x>y){
	        	sb.append(y+" "+x+"\n");
	        }else{
	        	sb.append(x+" "+y+"\n");
	        }
		} int x=sc.nextInt(); x sc.nextInt() sc.nextInt sc int y=sc.nextInt(); y sc.nextInt() sc.nextInt sc 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) System.out.print System.out System System.out sb String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			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);
	}
}