import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		while (true) {
			String line = sc.nextLine();
			if (line.equals("0 0")) {
				break;
			}
			list.add(line);
		}

		for (String line : list) {

			String[] string = line.split(" ");

			int[] is = new int[2];
			is[0] = Integer.parseInt(string[0]);
			is[1] = Integer.parseInt(string[1]);

			if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			}

			if (is[0] == 0 && is[1] == 0) {
				break;
			}
		}

	}

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		while (true) {
			String line = sc.nextLine();
			if (line.equals("0 0")) {
				break;
			}
			list.add(line);
		}

		for (String line : list) {

			String[] string = line.split(" ");

			int[] is = new int[2];
			is[0] = Integer.parseInt(string[0]);
			is[1] = Integer.parseInt(string[1]);

			if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			}

			if (is[0] == 0 && is[1] == 0) {
				break;
			}
		}

	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		while (true) {
			String line = sc.nextLine();
			if (line.equals("0 0")) {
				break;
			}
			list.add(line);
		}

		for (String line : list) {

			String[] string = line.split(" ");

			int[] is = new int[2];
			is[0] = Integer.parseInt(string[0]);
			is[1] = Integer.parseInt(string[1]);

			if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			}

			if (is[0] == 0 && is[1] == 0) {
				break;
			}
		}

	} main {

		Scanner sc = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		while (true) {
			String line = sc.nextLine();
			if (line.equals("0 0")) {
				break;
			}
			list.add(line);
		}

		for (String line : list) {

			String[] string = line.split(" ");

			int[] is = new int[2];
			is[0] = Integer.parseInt(string[0]);
			is[1] = Integer.parseInt(string[1]);

			if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			}

			if (is[0] == 0 && is[1] == 0) {
				break;
			}
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) List<String> list = new ArrayList<String>(); list new ArrayList<String>() while (true) {
			String line = sc.nextLine();
			if (line.equals("0 0")) {
				break;
			}
			list.add(line);
		} true {
			String line = sc.nextLine();
			if (line.equals("0 0")) {
				break;
			}
			list.add(line);
		} String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc if (line.equals("0 0")) {
				break;
			} line.equals("0 0") line.equals line "0 0" {
				break;
			} break; list.add(line) list.add list line for (String line : list) {

			String[] string = line.split(" ");

			int[] is = new int[2];
			is[0] = Integer.parseInt(string[0]);
			is[1] = Integer.parseInt(string[1]);

			if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			}

			if (is[0] == 0 && is[1] == 0) {
				break;
			}
		} String line list {

			String[] string = line.split(" ");

			int[] is = new int[2];
			is[0] = Integer.parseInt(string[0]);
			is[1] = Integer.parseInt(string[1]);

			if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			}

			if (is[0] == 0 && is[1] == 0) {
				break;
			}
		} {

			String[] string = line.split(" ");

			int[] is = new int[2];
			is[0] = Integer.parseInt(string[0]);
			is[1] = Integer.parseInt(string[1]);

			if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			}

			if (is[0] == 0 && is[1] == 0) {
				break;
			}
		} String[] string = line.split(" "); string line.split(" ") line.split line " " int[] is = new int[2]; is new int[2] 2 is[0] = Integer.parseInt(string[0]) is[0] is 0 Integer.parseInt(string[0]) Integer.parseInt Integer string[0] string 0 is[1] = Integer.parseInt(string[1]) is[1] is 1 Integer.parseInt(string[1]) Integer.parseInt Integer string[1] string 1 if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			} is[0] <= is[1] is[0] is 0 is[1] is 1 {
				System.out.println(is[0] + " " + is[1]);
			} System.out.println(is[0] + " " + is[1]) System.out.println System.out System System.out is[0] + " " + is[1] is[0] + " " + is[1] is[0] is 0 " " is[1] is 1 {
				System.out.println(is[1] + " " + is[0]);
			} System.out.println(is[1] + " " + is[0]) System.out.println System.out System System.out is[1] + " " + is[0] is[1] + " " + is[0] is[1] is 1 " " is[0] is 0 if (is[0] == 0 && is[1] == 0) {
				break;
			} is[0] == 0 && is[1] == 0 is[0] == 0 is[0] is 0 0 is[1] == 0 is[1] is 1 0 {
				break;
			} break; String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		while (true) {
			String line = sc.nextLine();
			if (line.equals("0 0")) {
				break;
			}
			list.add(line);
		}

		for (String line : list) {

			String[] string = line.split(" ");

			int[] is = new int[2];
			is[0] = Integer.parseInt(string[0]);
			is[1] = Integer.parseInt(string[1]);

			if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			}

			if (is[0] == 0 && is[1] == 0) {
				break;
			}
		}

	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		while (true) {
			String line = sc.nextLine();
			if (line.equals("0 0")) {
				break;
			}
			list.add(line);
		}

		for (String line : list) {

			String[] string = line.split(" ");

			int[] is = new int[2];
			is[0] = Integer.parseInt(string[0]);
			is[1] = Integer.parseInt(string[1]);

			if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			}

			if (is[0] == 0 && is[1] == 0) {
				break;
			}
		}

	}

} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		while (true) {
			String line = sc.nextLine();
			if (line.equals("0 0")) {
				break;
			}
			list.add(line);
		}

		for (String line : list) {

			String[] string = line.split(" ");

			int[] is = new int[2];
			is[0] = Integer.parseInt(string[0]);
			is[1] = Integer.parseInt(string[1]);

			if (is[0] <= is[1]) {
				System.out.println(is[0] + " " + is[1]);
			} else {
				System.out.println(is[1] + " " + is[0]);
			}

			if (is[0] == 0 && is[1] == 0) {
				break;
			}
		}

	}

}