import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);;
		while(true) {
			int[] array = {scan.nextInt(), scan.nextInt()};
			Arrays.sort(array);
			if(array[0] == 0 && array[1] == 0) {
				break;
			}
			System.out.println(array[0] + " " + array[1]);
		}
		scan.close();
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);;
		while(true) {
			int[] array = {scan.nextInt(), scan.nextInt()};
			Arrays.sort(array);
			if(array[0] == 0 && array[1] == 0) {
				break;
			}
			System.out.println(array[0] + " " + array[1]);
		}
		scan.close();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);;
		while(true) {
			int[] array = {scan.nextInt(), scan.nextInt()};
			Arrays.sort(array);
			if(array[0] == 0 && array[1] == 0) {
				break;
			}
			System.out.println(array[0] + " " + array[1]);
		}
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);;
		while(true) {
			int[] array = {scan.nextInt(), scan.nextInt()};
			Arrays.sort(array);
			if(array[0] == 0 && array[1] == 0) {
				break;
			}
			System.out.println(array[0] + " " + array[1]);
		}
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(true) {
			int[] array = {scan.nextInt(), scan.nextInt()};
			Arrays.sort(array);
			if(array[0] == 0 && array[1] == 0) {
				break;
			}
			System.out.println(array[0] + " " + array[1]);
		} true {
			int[] array = {scan.nextInt(), scan.nextInt()};
			Arrays.sort(array);
			if(array[0] == 0 && array[1] == 0) {
				break;
			}
			System.out.println(array[0] + " " + array[1]);
		} int[] array = {scan.nextInt(), scan.nextInt()}; array {scan.nextInt(), scan.nextInt()} scan.nextInt() scan.nextInt scan scan.nextInt() scan.nextInt scan Arrays.sort(array) Arrays.sort Arrays array if(array[0] == 0 && array[1] == 0) {
				break;
			} array[0] == 0 && array[1] == 0 array[0] == 0 array[0] array 0 0 array[1] == 0 array[1] array 1 0 {
				break;
			} break; System.out.println(array[0] + " " + array[1]) System.out.println System.out System System.out array[0] + " " + array[1] array[0] + " " + array[1] array[0] array 0 " " array[1] array 1 scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);;
		while(true) {
			int[] array = {scan.nextInt(), scan.nextInt()};
			Arrays.sort(array);
			if(array[0] == 0 && array[1] == 0) {
				break;
			}
			System.out.println(array[0] + " " + array[1]);
		}
		scan.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);;
		while(true) {
			int[] array = {scan.nextInt(), scan.nextInt()};
			Arrays.sort(array);
			if(array[0] == 0 && array[1] == 0) {
				break;
			}
			System.out.println(array[0] + " " + array[1]);
		}
		scan.close();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);;
		while(true) {
			int[] array = {scan.nextInt(), scan.nextInt()};
			Arrays.sort(array);
			if(array[0] == 0 && array[1] == 0) {
				break;
			}
			System.out.println(array[0] + " " + array[1]);
		}
		scan.close();
	}
}
