import java.util.Scanner;

class Main{
	public static void main(String args[]){
	Scanner scan = new Scanner(System.in);
	int i = 1;
	int x,y;
		do{
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0){
				break;
			}
			if(x < y){	
				System.out.println(x + " " + y);			
			}
			else{
				System.out.println(y + " " + x);
			}
			i++;
		}while(true);
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String args[]){
	Scanner scan = new Scanner(System.in);
	int i = 1;
	int x,y;
		do{
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0){
				break;
			}
			if(x < y){	
				System.out.println(x + " " + y);			
			}
			else{
				System.out.println(y + " " + x);
			}
			i++;
		}while(true);
	}
} Main public static void main(String args[]){
	Scanner scan = new Scanner(System.in);
	int i = 1;
	int x,y;
		do{
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0){
				break;
			}
			if(x < y){	
				System.out.println(x + " " + y);			
			}
			else{
				System.out.println(y + " " + x);
			}
			i++;
		}while(true);
	} main {
	Scanner scan = new Scanner(System.in);
	int i = 1;
	int x,y;
		do{
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0){
				break;
			}
			if(x < y){	
				System.out.println(x + " " + y);			
			}
			else{
				System.out.println(y + " " + x);
			}
			i++;
		}while(true);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int i = 1; i 1 int x x y; y do{
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0){
				break;
			}
			if(x < y){	
				System.out.println(x + " " + y);			
			}
			else{
				System.out.println(y + " " + x);
			}
			i++;
		}while(true); true {
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0){
				break;
			}
			if(x < y){	
				System.out.println(x + " " + y);			
			}
			else{
				System.out.println(y + " " + x);
			}
			i++;
		} x = scan.nextInt() x scan.nextInt() scan.nextInt scan y = scan.nextInt() y scan.nextInt() scan.nextInt scan if(x == 0 && y == 0){
				break;
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
				break;
			} break; if(x < y){	
				System.out.println(x + " " + y);			
			}
			else{
				System.out.println(y + " " + x);
			} x < y x y {	
				System.out.println(x + " " + y);			
			} System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y {
				System.out.println(y + " " + x);
			} System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x i++ i String args[] args
import java.util.Scanner;

class Main{
	public static void main(String args[]){
	Scanner scan = new Scanner(System.in);
	int i = 1;
	int x,y;
		do{
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0){
				break;
			}
			if(x < y){	
				System.out.println(x + " " + y);			
			}
			else{
				System.out.println(y + " " + x);
			}
			i++;
		}while(true);
	}
}