import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String[] arr = reader.readLine().split(" ", 0);
			int[] arr_int = new int[2];
			for (int i =0; i< 2; i++){
				arr_int[i] = Integer.parseInt(arr[i]);
			}
			if (arr_int[0] == arr_int[1] && arr_int[0] == 0){
				
				break;
			}
			change(arr_int);
			builder.append(arr_int[0]).append(" ").append(arr_int[1]).append("\n");
		}
		System.out.print(builder);

	}
	
	public static void change(int[] array){
		if (array[0] > array[1]){
			int tmp = array[0];
			array[0] = array[1];
			array[1] = tmp;
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String[] arr = reader.readLine().split(" ", 0);
			int[] arr_int = new int[2];
			for (int i =0; i< 2; i++){
				arr_int[i] = Integer.parseInt(arr[i]);
			}
			if (arr_int[0] == arr_int[1] && arr_int[0] == 0){
				
				break;
			}
			change(arr_int);
			builder.append(arr_int[0]).append(" ").append(arr_int[1]).append("\n");
		}
		System.out.print(builder);

	}
	
	public static void change(int[] array){
		if (array[0] > array[1]){
			int tmp = array[0];
			array[0] = array[1];
			array[1] = tmp;
		}
	}

} Main public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String[] arr = reader.readLine().split(" ", 0);
			int[] arr_int = new int[2];
			for (int i =0; i< 2; i++){
				arr_int[i] = Integer.parseInt(arr[i]);
			}
			if (arr_int[0] == arr_int[1] && arr_int[0] == 0){
				
				break;
			}
			change(arr_int);
			builder.append(arr_int[0]).append(" ").append(arr_int[1]).append("\n");
		}
		System.out.print(builder);

	} main {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String[] arr = reader.readLine().split(" ", 0);
			int[] arr_int = new int[2];
			for (int i =0; i< 2; i++){
				arr_int[i] = Integer.parseInt(arr[i]);
			}
			if (arr_int[0] == arr_int[1] && arr_int[0] == 0){
				
				break;
			}
			change(arr_int);
			builder.append(arr_int[0]).append(" ").append(arr_int[1]).append("\n");
		}
		System.out.print(builder);

	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) StringBuilder builder = new StringBuilder(); builder new StringBuilder() while(true){
			String[] arr = reader.readLine().split(" ", 0);
			int[] arr_int = new int[2];
			for (int i =0; i< 2; i++){
				arr_int[i] = Integer.parseInt(arr[i]);
			}
			if (arr_int[0] == arr_int[1] && arr_int[0] == 0){
				
				break;
			}
			change(arr_int);
			builder.append(arr_int[0]).append(" ").append(arr_int[1]).append("\n");
		} true {
			String[] arr = reader.readLine().split(" ", 0);
			int[] arr_int = new int[2];
			for (int i =0; i< 2; i++){
				arr_int[i] = Integer.parseInt(arr[i]);
			}
			if (arr_int[0] == arr_int[1] && arr_int[0] == 0){
				
				break;
			}
			change(arr_int);
			builder.append(arr_int[0]).append(" ").append(arr_int[1]).append("\n");
		} String[] arr = reader.readLine().split(" ", 0); arr reader.readLine().split(" ", 0) reader.readLine().split reader.readLine() reader.readLine reader " " 0 int[] arr_int = new int[2]; arr_int new int[2] 2 for (int i =0; i< 2; i++){
				arr_int[i] = Integer.parseInt(arr[i]);
			} int i =0; int i =0; i 0 i< 2 i 2 i++ i++ i {
				arr_int[i] = Integer.parseInt(arr[i]);
			} {
				arr_int[i] = Integer.parseInt(arr[i]);
			} arr_int[i] = Integer.parseInt(arr[i]) arr_int[i] arr_int i Integer.parseInt(arr[i]) Integer.parseInt Integer arr[i] arr i if (arr_int[0] == arr_int[1] && arr_int[0] == 0){
				
				break;
			} arr_int[0] == arr_int[1] && arr_int[0] == 0 arr_int[0] == arr_int[1] arr_int[0] arr_int 0 arr_int[1] arr_int 1 arr_int[0] == 0 arr_int[0] arr_int 0 0 {
				
				break;
			} break; change(arr_int) change arr_int builder.append(arr_int[0]).append(" ").append(arr_int[1]).append("\n") builder.append(arr_int[0]).append(" ").append(arr_int[1]).append builder.append(arr_int[0]).append(" ").append(arr_int[1]) builder.append(arr_int[0]).append(" ").append builder.append(arr_int[0]).append(" ") builder.append(arr_int[0]).append builder.append(arr_int[0]) builder.append builder arr_int[0] arr_int 0 " " arr_int[1] arr_int 1 "\n" System.out.print(builder) System.out.print System.out System System.out builder String[] args args public static void change(int[] array){
		if (array[0] > array[1]){
			int tmp = array[0];
			array[0] = array[1];
			array[1] = tmp;
		}
	} change {
		if (array[0] > array[1]){
			int tmp = array[0];
			array[0] = array[1];
			array[1] = tmp;
		}
	} if (array[0] > array[1]){
			int tmp = array[0];
			array[0] = array[1];
			array[1] = tmp;
		} array[0] > array[1] array[0] array 0 array[1] array 1 {
			int tmp = array[0];
			array[0] = array[1];
			array[1] = tmp;
		} int tmp = array[0]; tmp array[0] array 0 array[0] = array[1] array[0] array 0 array[1] array 1 array[1] = tmp array[1] array 1 tmp int[] array array public class Main {

	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String[] arr = reader.readLine().split(" ", 0);
			int[] arr_int = new int[2];
			for (int i =0; i< 2; i++){
				arr_int[i] = Integer.parseInt(arr[i]);
			}
			if (arr_int[0] == arr_int[1] && arr_int[0] == 0){
				
				break;
			}
			change(arr_int);
			builder.append(arr_int[0]).append(" ").append(arr_int[1]).append("\n");
		}
		System.out.print(builder);

	}
	
	public static void change(int[] array){
		if (array[0] > array[1]){
			int tmp = array[0];
			array[0] = array[1];
			array[1] = tmp;
		}
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String[] arr = reader.readLine().split(" ", 0);
			int[] arr_int = new int[2];
			for (int i =0; i< 2; i++){
				arr_int[i] = Integer.parseInt(arr[i]);
			}
			if (arr_int[0] == arr_int[1] && arr_int[0] == 0){
				
				break;
			}
			change(arr_int);
			builder.append(arr_int[0]).append(" ").append(arr_int[1]).append("\n");
		}
		System.out.print(builder);

	}
	
	public static void change(int[] array){
		if (array[0] > array[1]){
			int tmp = array[0];
			array[0] = array[1];
			array[1] = tmp;
		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();
		while(true){
			String[] arr = reader.readLine().split(" ", 0);
			int[] arr_int = new int[2];
			for (int i =0; i< 2; i++){
				arr_int[i] = Integer.parseInt(arr[i]);
			}
			if (arr_int[0] == arr_int[1] && arr_int[0] == 0){
				
				break;
			}
			change(arr_int);
			builder.append(arr_int[0]).append(" ").append(arr_int[1]).append("\n");
		}
		System.out.print(builder);

	}
	
	public static void change(int[] array){
		if (array[0] > array[1]){
			int tmp = array[0];
			array[0] = array[1];
			array[1] = tmp;
		}
	}

}