import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		while(true){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();
			
			if(num1 == 0 && num2 == 0){
				break;
				
			}
			else{
				System.out.println(Math.min(num1,num2) + " " + Math.max(num1,num2));
			}
		}
	}
} import java.util.*; util.* java class Main{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		while(true){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();
			
			if(num1 == 0 && num2 == 0){
				break;
				
			}
			else{
				System.out.println(Math.min(num1,num2) + " " + Math.max(num1,num2));
			}
		}
	}
} Main public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		while(true){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();
			
			if(num1 == 0 && num2 == 0){
				break;
				
			}
			else{
				System.out.println(Math.min(num1,num2) + " " + Math.max(num1,num2));
			}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		while(true){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();
			
			if(num1 == 0 && num2 == 0){
				break;
				
			}
			else{
				System.out.println(Math.min(num1,num2) + " " + Math.max(num1,num2));
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(true){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();
			
			if(num1 == 0 && num2 == 0){
				break;
				
			}
			else{
				System.out.println(Math.min(num1,num2) + " " + Math.max(num1,num2));
			}
		} true {
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();
			
			if(num1 == 0 && num2 == 0){
				break;
				
			}
			else{
				System.out.println(Math.min(num1,num2) + " " + Math.max(num1,num2));
			}
		} int num1 = scan.nextInt(); num1 scan.nextInt() scan.nextInt scan int num2 = scan.nextInt(); num2 scan.nextInt() scan.nextInt scan if(num1 == 0 && num2 == 0){
				break;
				
			}
			else{
				System.out.println(Math.min(num1,num2) + " " + Math.max(num1,num2));
			} num1 == 0 && num2 == 0 num1 == 0 num1 0 num2 == 0 num2 0 {
				break;
				
			} break; {
				System.out.println(Math.min(num1,num2) + " " + Math.max(num1,num2));
			} System.out.println(Math.min(num1,num2) + " " + Math.max(num1,num2)) System.out.println System.out System System.out Math.min(num1,num2) + " " + Math.max(num1,num2) Math.min(num1,num2) + " " + Math.max(num1,num2) Math.min(num1,num2) Math.min Math num1 num2 " " Math.max(num1,num2) Math.max Math num1 num2 String args[] args
import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		while(true){
			int num1 = scan.nextInt();
			int num2 = scan.nextInt();
			
			if(num1 == 0 && num2 == 0){
				break;
				
			}
			else{
				System.out.println(Math.min(num1,num2) + " " + Math.max(num1,num2));
			}
		}
	}
}