import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (true) {
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		if (a == 0 && b == 0) {
			break;
		}
		if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (true) {
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		if (a == 0 && b == 0) {
			break;
		}
		if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		}
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (true) {
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		if (a == 0 && b == 0) {
			break;
		}
		if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		}
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		while (true) {
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		if (a == 0 && b == 0) {
			break;
		}
		if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		}
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while (true) {
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		if (a == 0 && b == 0) {
			break;
		}
		if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		}
		} true {
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		if (a == 0 && b == 0) {
			break;
		}
		if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		}
		} int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner if (a == 0 && b == 0) {
			break;
		} a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {
			break;
		} break; if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		} a <= b a b {
			System.out.println (a + " " + b);
		} System.out.println (a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b {
			System.out.println (b + " " + a);
		} System.out.println (b + " " + a) System.out.println System.out System System.out b + " " + a b + " " + a b " " a String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (true) {
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		if (a == 0 && b == 0) {
			break;
		}
		if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		}
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (true) {
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		if (a == 0 && b == 0) {
			break;
		}
		if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		}
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (true) {
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		if (a == 0 && b == 0) {
			break;
		}
		if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		}
		}
	}
}
