import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner kbScanner = new Scanner(System.in);
		int input1 = kbScanner.nextInt();
		int input2 = kbScanner.nextInt();
		
		while((input1 != 0) || (input2 != 0)){
			if(input1 > input2){
				int oki = input1;
				input1 = input2;
				input2 = oki;
			}
			System.out.println(input1 + " " + input2);
			input1 = kbScanner.nextInt();
			input2 = kbScanner.nextInt();
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner kbScanner = new Scanner(System.in);
		int input1 = kbScanner.nextInt();
		int input2 = kbScanner.nextInt();
		
		while((input1 != 0) || (input2 != 0)){
			if(input1 > input2){
				int oki = input1;
				input1 = input2;
				input2 = oki;
			}
			System.out.println(input1 + " " + input2);
			input1 = kbScanner.nextInt();
			input2 = kbScanner.nextInt();
		}
	}
} Main public static void main(String[] args) {
		Scanner kbScanner = new Scanner(System.in);
		int input1 = kbScanner.nextInt();
		int input2 = kbScanner.nextInt();
		
		while((input1 != 0) || (input2 != 0)){
			if(input1 > input2){
				int oki = input1;
				input1 = input2;
				input2 = oki;
			}
			System.out.println(input1 + " " + input2);
			input1 = kbScanner.nextInt();
			input2 = kbScanner.nextInt();
		}
	} main {
		Scanner kbScanner = new Scanner(System.in);
		int input1 = kbScanner.nextInt();
		int input2 = kbScanner.nextInt();
		
		while((input1 != 0) || (input2 != 0)){
			if(input1 > input2){
				int oki = input1;
				input1 = input2;
				input2 = oki;
			}
			System.out.println(input1 + " " + input2);
			input1 = kbScanner.nextInt();
			input2 = kbScanner.nextInt();
		}
	} Scanner kbScanner = new Scanner(System.in); kbScanner new Scanner(System.in) int input1 = kbScanner.nextInt(); input1 kbScanner.nextInt() kbScanner.nextInt kbScanner int input2 = kbScanner.nextInt(); input2 kbScanner.nextInt() kbScanner.nextInt kbScanner while((input1 != 0) || (input2 != 0)){
			if(input1 > input2){
				int oki = input1;
				input1 = input2;
				input2 = oki;
			}
			System.out.println(input1 + " " + input2);
			input1 = kbScanner.nextInt();
			input2 = kbScanner.nextInt();
		} (input1 != 0) || (input2 != 0) (input1 != 0) input1 0 (input2 != 0) input2 0 {
			if(input1 > input2){
				int oki = input1;
				input1 = input2;
				input2 = oki;
			}
			System.out.println(input1 + " " + input2);
			input1 = kbScanner.nextInt();
			input2 = kbScanner.nextInt();
		} if(input1 > input2){
				int oki = input1;
				input1 = input2;
				input2 = oki;
			} input1 > input2 input1 input2 {
				int oki = input1;
				input1 = input2;
				input2 = oki;
			} int oki = input1; oki input1 input1 = input2 input1 input2 input2 = oki input2 oki System.out.println(input1 + " " + input2) System.out.println System.out System System.out input1 + " " + input2 input1 + " " + input2 input1 " " input2 input1 = kbScanner.nextInt() input1 kbScanner.nextInt() kbScanner.nextInt kbScanner input2 = kbScanner.nextInt() input2 kbScanner.nextInt() kbScanner.nextInt kbScanner String[] args args public class Main {
	public static void main(String[] args) {
		Scanner kbScanner = new Scanner(System.in);
		int input1 = kbScanner.nextInt();
		int input2 = kbScanner.nextInt();
		
		while((input1 != 0) || (input2 != 0)){
			if(input1 > input2){
				int oki = input1;
				input1 = input2;
				input2 = oki;
			}
			System.out.println(input1 + " " + input2);
			input1 = kbScanner.nextInt();
			input2 = kbScanner.nextInt();
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner kbScanner = new Scanner(System.in);
		int input1 = kbScanner.nextInt();
		int input2 = kbScanner.nextInt();
		
		while((input1 != 0) || (input2 != 0)){
			if(input1 > input2){
				int oki = input1;
				input1 = input2;
				input2 = oki;
			}
			System.out.println(input1 + " " + input2);
			input1 = kbScanner.nextInt();
			input2 = kbScanner.nextInt();
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner kbScanner = new Scanner(System.in);
		int input1 = kbScanner.nextInt();
		int input2 = kbScanner.nextInt();
		
		while((input1 != 0) || (input2 != 0)){
			if(input1 > input2){
				int oki = input1;
				input1 = input2;
				input2 = oki;
			}
			System.out.println(input1 + " " + input2);
			input1 = kbScanner.nextInt();
			input2 = kbScanner.nextInt();
		}
	}
}