import java.util.Scanner;

public class Main {

	public static void main(String[] arges) {

		Scanner sc = new Scanner(System.in);
		String[] line = new String[3001];

		for (int i = 0; i < line.length; i++) {
			line[i] = sc.nextLine();

			if (line[i].equals("0 0")) {
				break;
			}
		}
		for (int i = 0; i < line.length; i++) {

			if (line[i].equals("0 0")) {
				break;
			}
			String[] lined = line[i].split(" ");
			int v = Integer.parseInt(lined[0]);
			int v2 = Integer.parseInt(lined[1]);
			if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			}
		}
	}

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

	public static void main(String[] arges) {

		Scanner sc = new Scanner(System.in);
		String[] line = new String[3001];

		for (int i = 0; i < line.length; i++) {
			line[i] = sc.nextLine();

			if (line[i].equals("0 0")) {
				break;
			}
		}
		for (int i = 0; i < line.length; i++) {

			if (line[i].equals("0 0")) {
				break;
			}
			String[] lined = line[i].split(" ");
			int v = Integer.parseInt(lined[0]);
			int v2 = Integer.parseInt(lined[1]);
			if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			}
		}
	}

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

		Scanner sc = new Scanner(System.in);
		String[] line = new String[3001];

		for (int i = 0; i < line.length; i++) {
			line[i] = sc.nextLine();

			if (line[i].equals("0 0")) {
				break;
			}
		}
		for (int i = 0; i < line.length; i++) {

			if (line[i].equals("0 0")) {
				break;
			}
			String[] lined = line[i].split(" ");
			int v = Integer.parseInt(lined[0]);
			int v2 = Integer.parseInt(lined[1]);
			if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			}
		}
	} main {

		Scanner sc = new Scanner(System.in);
		String[] line = new String[3001];

		for (int i = 0; i < line.length; i++) {
			line[i] = sc.nextLine();

			if (line[i].equals("0 0")) {
				break;
			}
		}
		for (int i = 0; i < line.length; i++) {

			if (line[i].equals("0 0")) {
				break;
			}
			String[] lined = line[i].split(" ");
			int v = Integer.parseInt(lined[0]);
			int v2 = Integer.parseInt(lined[1]);
			if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] line = new String[3001]; line new String[3001] 3001 for (int i = 0; i < line.length; i++) {
			line[i] = sc.nextLine();

			if (line[i].equals("0 0")) {
				break;
			}
		} int i = 0; int i = 0; i 0 i < line.length i line.length line line.length i++ i++ i {
			line[i] = sc.nextLine();

			if (line[i].equals("0 0")) {
				break;
			}
		} {
			line[i] = sc.nextLine();

			if (line[i].equals("0 0")) {
				break;
			}
		} line[i] = sc.nextLine() line[i] line i sc.nextLine() sc.nextLine sc if (line[i].equals("0 0")) {
				break;
			} line[i].equals("0 0") line[i].equals line[i] line i "0 0" {
				break;
			} break; for (int i = 0; i < line.length; i++) {

			if (line[i].equals("0 0")) {
				break;
			}
			String[] lined = line[i].split(" ");
			int v = Integer.parseInt(lined[0]);
			int v2 = Integer.parseInt(lined[1]);
			if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			}
		} int i = 0; int i = 0; i 0 i < line.length i line.length line line.length i++ i++ i {

			if (line[i].equals("0 0")) {
				break;
			}
			String[] lined = line[i].split(" ");
			int v = Integer.parseInt(lined[0]);
			int v2 = Integer.parseInt(lined[1]);
			if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			}
		} {

			if (line[i].equals("0 0")) {
				break;
			}
			String[] lined = line[i].split(" ");
			int v = Integer.parseInt(lined[0]);
			int v2 = Integer.parseInt(lined[1]);
			if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			}
		} if (line[i].equals("0 0")) {
				break;
			} line[i].equals("0 0") line[i].equals line[i] line i "0 0" {
				break;
			} break; String[] lined = line[i].split(" "); lined line[i].split(" ") line[i].split line[i] line i " " int v = Integer.parseInt(lined[0]); v Integer.parseInt(lined[0]) Integer.parseInt Integer lined[0] lined 0 int v2 = Integer.parseInt(lined[1]); v2 Integer.parseInt(lined[1]) Integer.parseInt Integer lined[1] lined 1 if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			} v > v2 v v2 {
				System.out.println(v2 + " " + v);
			} System.out.println(v2 + " " + v) System.out.println System.out System System.out v2 + " " + v v2 + " " + v v2 " " v {
				System.out.println(v + " " + v2);
			} System.out.println(v + " " + v2) System.out.println System.out System System.out v + " " + v2 v + " " + v2 v " " v2 String[] arges arges public class Main {

	public static void main(String[] arges) {

		Scanner sc = new Scanner(System.in);
		String[] line = new String[3001];

		for (int i = 0; i < line.length; i++) {
			line[i] = sc.nextLine();

			if (line[i].equals("0 0")) {
				break;
			}
		}
		for (int i = 0; i < line.length; i++) {

			if (line[i].equals("0 0")) {
				break;
			}
			String[] lined = line[i].split(" ");
			int v = Integer.parseInt(lined[0]);
			int v2 = Integer.parseInt(lined[1]);
			if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			}
		}
	}

} public class Main {

	public static void main(String[] arges) {

		Scanner sc = new Scanner(System.in);
		String[] line = new String[3001];

		for (int i = 0; i < line.length; i++) {
			line[i] = sc.nextLine();

			if (line[i].equals("0 0")) {
				break;
			}
		}
		for (int i = 0; i < line.length; i++) {

			if (line[i].equals("0 0")) {
				break;
			}
			String[] lined = line[i].split(" ");
			int v = Integer.parseInt(lined[0]);
			int v2 = Integer.parseInt(lined[1]);
			if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			}
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] arges) {

		Scanner sc = new Scanner(System.in);
		String[] line = new String[3001];

		for (int i = 0; i < line.length; i++) {
			line[i] = sc.nextLine();

			if (line[i].equals("0 0")) {
				break;
			}
		}
		for (int i = 0; i < line.length; i++) {

			if (line[i].equals("0 0")) {
				break;
			}
			String[] lined = line[i].split(" ");
			int v = Integer.parseInt(lined[0]);
			int v2 = Integer.parseInt(lined[1]);
			if (v > v2) {
				System.out.println(v2 + " " + v);
			} else {
				System.out.println(v + " " + v2);
			}
		}
	}

}