import java.util.Scanner;

 class Main {
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int x;
		int y;
		
		while(true){
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0)break;
			if(x > y){
				System.out.println(y + " " + x);
			}
			else if(x < y){
				System.out.println(x + " " + y);
			}
			if(x == y ){
				System.out.println(x + " " + y);
			}
		}
	}	
} import java.util.Scanner; Scanner java.util class Main {
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int x;
		int y;
		
		while(true){
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0)break;
			if(x > y){
				System.out.println(y + " " + x);
			}
			else if(x < y){
				System.out.println(x + " " + y);
			}
			if(x == y ){
				System.out.println(x + " " + y);
			}
		}
	}	
} Main @SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int x;
		int y;
		
		while(true){
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0)break;
			if(x > y){
				System.out.println(y + " " + x);
			}
			else if(x < y){
				System.out.println(x + " " + y);
			}
			if(x == y ){
				System.out.println(x + " " + y);
			}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int x;
		int y;
		
		while(true){
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0)break;
			if(x > y){
				System.out.println(y + " " + x);
			}
			else if(x < y){
				System.out.println(x + " " + y);
			}
			if(x == y ){
				System.out.println(x + " " + y);
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int x; x int y; y while(true){
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0)break;
			if(x > y){
				System.out.println(y + " " + x);
			}
			else if(x < y){
				System.out.println(x + " " + y);
			}
			if(x == y ){
				System.out.println(x + " " + y);
			}
		} true {
			x = scan.nextInt();
			y = scan.nextInt();
			if(x == 0 && y == 0)break;
			if(x > y){
				System.out.println(y + " " + x);
			}
			else if(x < y){
				System.out.println(x + " " + y);
			}
			if(x == y ){
				System.out.println(x + " " + y);
			}
		} 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; if(x > y){
				System.out.println(y + " " + x);
			}
			else if(x < y){
				System.out.println(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 if(x < y){
				System.out.println(x + " " + y);
			} 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 if(x == y ){
				System.out.println(x + " " + y);
			} 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 String[] args args
import java.util.Scanner;

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