import java.util.Scanner;

public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		StringBuilder output = new StringBuilder();

		while (true) {

			int number1 = input();
			int number2 = input();

			if (number1 < number2) {

				output.append(number1 + " " + number2);

			} else if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			}

			output.append("\n");

		}

		System.out.println(output);

		close();

	}

	public static int input() {

		return Integer.parseInt(scanner.next());

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		StringBuilder output = new StringBuilder();

		while (true) {

			int number1 = input();
			int number2 = input();

			if (number1 < number2) {

				output.append(number1 + " " + number2);

			} else if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			}

			output.append("\n");

		}

		System.out.println(output);

		close();

	}

	public static int input() {

		return Integer.parseInt(scanner.next());

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} Main public static Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) public static void main(String[] args) {

		StringBuilder output = new StringBuilder();

		while (true) {

			int number1 = input();
			int number2 = input();

			if (number1 < number2) {

				output.append(number1 + " " + number2);

			} else if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			}

			output.append("\n");

		}

		System.out.println(output);

		close();

	} main {

		StringBuilder output = new StringBuilder();

		while (true) {

			int number1 = input();
			int number2 = input();

			if (number1 < number2) {

				output.append(number1 + " " + number2);

			} else if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			}

			output.append("\n");

		}

		System.out.println(output);

		close();

	} StringBuilder output = new StringBuilder(); output new StringBuilder() while (true) {

			int number1 = input();
			int number2 = input();

			if (number1 < number2) {

				output.append(number1 + " " + number2);

			} else if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			}

			output.append("\n");

		} true {

			int number1 = input();
			int number2 = input();

			if (number1 < number2) {

				output.append(number1 + " " + number2);

			} else if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			}

			output.append("\n");

		} int number1 = input(); number1 input() input int number2 = input(); number2 input() input if (number1 < number2) {

				output.append(number1 + " " + number2);

			} else if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			} number1 < number2 number1 number2 {

				output.append(number1 + " " + number2);

			} output.append(number1 + " " + number2) output.append output number1 + " " + number2 number1 + " " + number2 number1 " " number2 if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			} number2 < number1 number2 number1 {

				output.append(number2 + " " + number1);

			} output.append(number2 + " " + number1) output.append output number2 + " " + number1 number2 + " " + number1 number2 " " number1 if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			} number1 ==0 && number2 == 0 number1 ==0 number1 0 number2 == 0 number2 0 {

				output.delete(output.length() -1, output.length());
				break;

			} output.delete(output.length() -1, output.length()) output.delete output output.length() -1 output.length() output.length output 1 output.length() output.length output break; if (number1 == number2){

				output.append(number1 + " " + number2);

			} number1 == number2 number1 number2 {

				output.append(number1 + " " + number2);

			} output.append(number1 + " " + number2) output.append output number1 + " " + number2 number1 + " " + number2 number1 " " number2 output.append("\n") output.append output "\n" System.out.println(output) System.out.println System.out System System.out output close() close String[] args args public static int input() {

		return Integer.parseInt(scanner.next());

	} input {

		return Integer.parseInt(scanner.next());

	} return Integer.parseInt(scanner.next()); Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	} close {

		if (scanner != null) {

			scanner.close();

		}
	} if (scanner != null) {

			scanner.close();

		} scanner != null scanner null {

			scanner.close();

		} scanner.close() scanner.close scanner public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		StringBuilder output = new StringBuilder();

		while (true) {

			int number1 = input();
			int number2 = input();

			if (number1 < number2) {

				output.append(number1 + " " + number2);

			} else if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			}

			output.append("\n");

		}

		System.out.println(output);

		close();

	}

	public static int input() {

		return Integer.parseInt(scanner.next());

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		StringBuilder output = new StringBuilder();

		while (true) {

			int number1 = input();
			int number2 = input();

			if (number1 < number2) {

				output.append(number1 + " " + number2);

			} else if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			}

			output.append("\n");

		}

		System.out.println(output);

		close();

	}

	public static int input() {

		return Integer.parseInt(scanner.next());

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		StringBuilder output = new StringBuilder();

		while (true) {

			int number1 = input();
			int number2 = input();

			if (number1 < number2) {

				output.append(number1 + " " + number2);

			} else if (number2 < number1) {

				output.append(number2 + " " + number1);

			} else if (number1 ==0 && number2 == 0) {

				output.delete(output.length() -1, output.length());
				break;

			} else if (number1 == number2){

				output.append(number1 + " " + number2);

			}

			output.append("\n");

		}

		System.out.println(output);

		close();

	}

	public static int input() {

		return Integer.parseInt(scanner.next());

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
}