import java.util.Scanner;

/**
 * @author ??\???
 *
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		for (int x = scanner.nextInt(), y = scanner.nextInt();
				(x != 0) || (y != 0);
				x = scanner.nextInt(), y = scanner.nextInt()) {
			if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			}
		}
		scanner.close();
	}

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

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		for (int x = scanner.nextInt(), y = scanner.nextInt();
				(x != 0) || (y != 0);
				x = scanner.nextInt(), y = scanner.nextInt()) {
			if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			}
		}
		scanner.close();
	}

} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		for (int x = scanner.nextInt(), y = scanner.nextInt();
				(x != 0) || (y != 0);
				x = scanner.nextInt(), y = scanner.nextInt()) {
			if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			}
		}
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		for (int x = scanner.nextInt(), y = scanner.nextInt();
				(x != 0) || (y != 0);
				x = scanner.nextInt(), y = scanner.nextInt()) {
			if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			}
		}
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) for (int x = scanner.nextInt(), y = scanner.nextInt();
				(x != 0) || (y != 0);
				x = scanner.nextInt(), y = scanner.nextInt()) {
			if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			}
		} int x = scanner.nextInt(), y = scanner.nextInt(); int x = scanner.nextInt() x scanner.nextInt() scanner.nextInt scanner y = scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner (x != 0) || (y != 0) (x != 0) x 0 (y != 0) y 0 x = scanner.nextInt(), y = scanner.nextInt() x = scanner.nextInt() x scanner.nextInt() scanner.nextInt scanner y = scanner.nextInt() y scanner.nextInt() scanner.nextInt scanner {
			if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			}
		} {
			if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			}
		} if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			} x < y x y {
				System.out.println("" + x + " " + y);
			} System.out.println("" + x + " " + y) System.out.println System.out System System.out "" + x + " " + y " " "" + x + " " + y "" x " " y {
				System.out.println("" + y + " " + x);
			} System.out.println("" + y + " " + x) System.out.println System.out System System.out "" + y + " " + x " " "" + y + " " + x "" y " " x scanner.close() scanner.close scanner String[] args args public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		for (int x = scanner.nextInt(), y = scanner.nextInt();
				(x != 0) || (y != 0);
				x = scanner.nextInt(), y = scanner.nextInt()) {
			if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			}
		}
		scanner.close();
	}

} public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		for (int x = scanner.nextInt(), y = scanner.nextInt();
				(x != 0) || (y != 0);
				x = scanner.nextInt(), y = scanner.nextInt()) {
			if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			}
		}
		scanner.close();
	}

} Main
import java.util.Scanner;

/**
 * @author ??\???
 *
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		for (int x = scanner.nextInt(), y = scanner.nextInt();
				(x != 0) || (y != 0);
				x = scanner.nextInt(), y = scanner.nextInt()) {
			if (x < y) {
				System.out.println("" + x + " " + y);
			} else {
				System.out.println("" + y + " " + x);
			}
		}
		scanner.close();
	}

}