import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder text = new StringBuilder();
		while (true) {
			int numA = scan.nextInt();
			int numB = scan.nextInt();
			if (numA == 0 && numB == 0) {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} else {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			}
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder text = new StringBuilder();
		while (true) {
			int numA = scan.nextInt();
			int numB = scan.nextInt();
			if (numA == 0 && numB == 0) {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} else {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			}
		}
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder text = new StringBuilder();
		while (true) {
			int numA = scan.nextInt();
			int numB = scan.nextInt();
			if (numA == 0 && numB == 0) {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} else {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		StringBuilder text = new StringBuilder();
		while (true) {
			int numA = scan.nextInt();
			int numB = scan.nextInt();
			if (numA == 0 && numB == 0) {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} else {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) StringBuilder text = new StringBuilder(); text new StringBuilder() while (true) {
			int numA = scan.nextInt();
			int numB = scan.nextInt();
			if (numA == 0 && numB == 0) {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} else {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			}
		} true {
			int numA = scan.nextInt();
			int numB = scan.nextInt();
			if (numA == 0 && numB == 0) {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} else {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			}
		} int numA = scan.nextInt(); numA scan.nextInt() scan.nextInt scan int numB = scan.nextInt(); numB scan.nextInt() scan.nextInt scan if (numA == 0 && numB == 0) {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} else {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			} numA == 0 && numB == 0 numA == 0 numA 0 numB == 0 numB 0 {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} scan.close() scan.close scan text.deleteCharAt(text.lastIndexOf("\n")) text.deleteCharAt text text.lastIndexOf("\n") text.lastIndexOf text "\n" System.out.println(text.toString()) System.out.println System.out System System.out text.toString() text.toString text break; {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			} if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n"); numA <= numB numA numB text.append(numA).append(" ").append(numB).append("\n") text.append(numA).append(" ").append(numB).append text.append(numA).append(" ").append(numB) text.append(numA).append(" ").append text.append(numA).append(" ") text.append(numA).append text.append(numA) text.append text numA " " numB "\n" if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n"); numA > numB numA numB text.append(numB).append(" ").append(numA).append("\n") text.append(numB).append(" ").append(numA).append text.append(numB).append(" ").append(numA) text.append(numB).append(" ").append text.append(numB).append(" ") text.append(numB).append text.append(numB) text.append text numB " " numA "\n" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder text = new StringBuilder();
		while (true) {
			int numA = scan.nextInt();
			int numB = scan.nextInt();
			if (numA == 0 && numB == 0) {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} else {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			}
		}
	}

} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder text = new StringBuilder();
		while (true) {
			int numA = scan.nextInt();
			int numB = scan.nextInt();
			if (numA == 0 && numB == 0) {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} else {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			}
		}
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder text = new StringBuilder();
		while (true) {
			int numA = scan.nextInt();
			int numB = scan.nextInt();
			if (numA == 0 && numB == 0) {
				scan.close();
				text.deleteCharAt(text.lastIndexOf("\n"));
				System.out.println(text.toString());
				break;
			} else {
				if (numA <= numB)
					text.append(numA).append(" ").append(numB).append("\n");
				if (numA > numB)
					text.append(numB).append(" ").append(numA).append("\n");
			}
		}
	}

}