import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] num = new int[3000];
		int[] num2 = new int[3000];
		for (int i = 0; i < 3000; i++) {
			String line = sc.nextLine();
			String[] ss = line.split(" ");
			num[i] = Integer.parseInt(ss[0]);
			num2[i] = Integer.parseInt(ss[1]);
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
		}
		for (int i = 0; i < num.length; i++) {
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
			if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
			if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			}
			if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] num = new int[3000];
		int[] num2 = new int[3000];
		for (int i = 0; i < 3000; i++) {
			String line = sc.nextLine();
			String[] ss = line.split(" ");
			num[i] = Integer.parseInt(ss[0]);
			num2[i] = Integer.parseInt(ss[1]);
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
		}
		for (int i = 0; i < num.length; i++) {
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
			if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
			if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			}
			if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] num = new int[3000];
		int[] num2 = new int[3000];
		for (int i = 0; i < 3000; i++) {
			String line = sc.nextLine();
			String[] ss = line.split(" ");
			num[i] = Integer.parseInt(ss[0]);
			num2[i] = Integer.parseInt(ss[1]);
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
		}
		for (int i = 0; i < num.length; i++) {
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
			if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
			if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			}
			if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int[] num = new int[3000];
		int[] num2 = new int[3000];
		for (int i = 0; i < 3000; i++) {
			String line = sc.nextLine();
			String[] ss = line.split(" ");
			num[i] = Integer.parseInt(ss[0]);
			num2[i] = Integer.parseInt(ss[1]);
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
		}
		for (int i = 0; i < num.length; i++) {
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
			if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
			if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			}
			if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] num = new int[3000]; num new int[3000] 3000 int[] num2 = new int[3000]; num2 new int[3000] 3000 for (int i = 0; i < 3000; i++) {
			String line = sc.nextLine();
			String[] ss = line.split(" ");
			num[i] = Integer.parseInt(ss[0]);
			num2[i] = Integer.parseInt(ss[1]);
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
		} int i = 0; int i = 0; i 0 i < 3000 i 3000 i++ i++ i {
			String line = sc.nextLine();
			String[] ss = line.split(" ");
			num[i] = Integer.parseInt(ss[0]);
			num2[i] = Integer.parseInt(ss[1]);
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
		} {
			String line = sc.nextLine();
			String[] ss = line.split(" ");
			num[i] = Integer.parseInt(ss[0]);
			num2[i] = Integer.parseInt(ss[1]);
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
		} String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] ss = line.split(" "); ss line.split(" ") line.split line " " num[i] = Integer.parseInt(ss[0]) num[i] num i Integer.parseInt(ss[0]) Integer.parseInt Integer ss[0] ss 0 num2[i] = Integer.parseInt(ss[1]) num2[i] num2 i Integer.parseInt(ss[1]) Integer.parseInt Integer ss[1] ss 1 if (num[i] == 0 && num2[i] == 0) {
				break;
			} num[i] == 0 && num2[i] == 0 num[i] == 0 num[i] num i 0 num2[i] == 0 num2[i] num2 i 0 {
				break;
			} break; for (int i = 0; i < num.length; i++) {
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
			if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
			if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			}
			if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
		} int i = 0; int i = 0; i 0 i < num.length i num.length num num.length i++ i++ i {
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
			if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
			if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			}
			if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
		} {
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
			if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
			if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			}
			if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
		} if (num[i] == 0 && num2[i] == 0) {
				break;
			} num[i] == 0 && num2[i] == 0 num[i] == 0 num[i] num i 0 num2[i] == 0 num2[i] num2 i 0 {
				break;
			} break; if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			} num[i] < num2[i] num[i] num i num2[i] num2 i {
				System.out.println(num[i] + " " + num2[i]);
			} System.out.println(num[i] + " " + num2[i]) System.out.println System.out System System.out num[i] + " " + num2[i] num[i] + " " + num2[i] num[i] num i " " num2[i] num2 i if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			} num[i] > num2[i] num[i] num i num2[i] num2 i {
				System.out.println(num2[i] + " " + num[i]);
			} System.out.println(num2[i] + " " + num[i]) System.out.println System.out System System.out num2[i] + " " + num[i] num2[i] + " " + num[i] num2[i] num2 i " " num[i] num i if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			} num[i] == num2[i] num[i] num i num2[i] num2 i {
				System.out.println(num[i] + " " + num2[i]);
			} System.out.println(num[i] + " " + num2[i]) System.out.println System.out System System.out num[i] + " " + num2[i] num[i] + " " + num2[i] num[i] num i " " num2[i] num2 i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] num = new int[3000];
		int[] num2 = new int[3000];
		for (int i = 0; i < 3000; i++) {
			String line = sc.nextLine();
			String[] ss = line.split(" ");
			num[i] = Integer.parseInt(ss[0]);
			num2[i] = Integer.parseInt(ss[1]);
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
		}
		for (int i = 0; i < num.length; i++) {
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
			if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
			if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			}
			if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] num = new int[3000];
		int[] num2 = new int[3000];
		for (int i = 0; i < 3000; i++) {
			String line = sc.nextLine();
			String[] ss = line.split(" ");
			num[i] = Integer.parseInt(ss[0]);
			num2[i] = Integer.parseInt(ss[1]);
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
		}
		for (int i = 0; i < num.length; i++) {
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
			if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
			if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			}
			if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] num = new int[3000];
		int[] num2 = new int[3000];
		for (int i = 0; i < 3000; i++) {
			String line = sc.nextLine();
			String[] ss = line.split(" ");
			num[i] = Integer.parseInt(ss[0]);
			num2[i] = Integer.parseInt(ss[1]);
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
		}
		for (int i = 0; i < num.length; i++) {
			if (num[i] == 0 && num2[i] == 0) {
				break;
			}
			if (num[i] < num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
			if (num[i] > num2[i]) {
				System.out.println(num2[i] + " " + num[i]);
			}
			if (num[i] == num2[i]) {
				System.out.println(num[i] + " " + num2[i]);
			}
		}
	}
}