import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num1 = 1;
		int num2 = 1;
		for(int i = 0;; ++i) {
			num1 = scan.nextInt();
			num2 = scan.nextInt();
			if(num1 == 0 && num2 == 0) break;
			if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1);
		}
 }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num1 = 1;
		int num2 = 1;
		for(int i = 0;; ++i) {
			num1 = scan.nextInt();
			num2 = scan.nextInt();
			if(num1 == 0 && num2 == 0) break;
			if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1);
		}
 }
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num1 = 1;
		int num2 = 1;
		for(int i = 0;; ++i) {
			num1 = scan.nextInt();
			num2 = scan.nextInt();
			if(num1 == 0 && num2 == 0) break;
			if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1);
		}
 } main {
		Scanner scan = new Scanner(System.in);
		int num1 = 1;
		int num2 = 1;
		for(int i = 0;; ++i) {
			num1 = scan.nextInt();
			num2 = scan.nextInt();
			if(num1 == 0 && num2 == 0) break;
			if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1);
		}
 } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int num1 = 1; num1 1 int num2 = 1; num2 1 for(int i = 0;; ++i) {
			num1 = scan.nextInt();
			num2 = scan.nextInt();
			if(num1 == 0 && num2 == 0) break;
			if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1);
		} int i = 0; int i = 0; i 0 ++i ++i i {
			num1 = scan.nextInt();
			num2 = scan.nextInt();
			if(num1 == 0 && num2 == 0) break;
			if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1);
		} {
			num1 = scan.nextInt();
			num2 = scan.nextInt();
			if(num1 == 0 && num2 == 0) break;
			if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1);
		} num1 = scan.nextInt() num1 scan.nextInt() scan.nextInt scan num2 = scan.nextInt() num2 scan.nextInt() scan.nextInt scan if(num1 == 0 && num2 == 0) break; num1 == 0 && num2 == 0 num1 == 0 num1 0 num2 == 0 num2 0 break; if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1); num1 < num2 num1 num2 System.out.println(num1 + " " + num2) System.out.println System.out System System.out num1 + " " + num2 num1 + " " + num2 num1 " " num2 System.out.println(num2 + " " + num1) System.out.println System.out System System.out num2 + " " + num1 num2 + " " + num1 num2 " " num1 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num1 = 1;
		int num2 = 1;
		for(int i = 0;; ++i) {
			num1 = scan.nextInt();
			num2 = scan.nextInt();
			if(num1 == 0 && num2 == 0) break;
			if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1);
		}
 }
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num1 = 1;
		int num2 = 1;
		for(int i = 0;; ++i) {
			num1 = scan.nextInt();
			num2 = scan.nextInt();
			if(num1 == 0 && num2 == 0) break;
			if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1);
		}
 }
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num1 = 1;
		int num2 = 1;
		for(int i = 0;; ++i) {
			num1 = scan.nextInt();
			num2 = scan.nextInt();
			if(num1 == 0 && num2 == 0) break;
			if(num1 < num2) System.out.println(num1 + " " + num2);
			else System.out.println(num2 + " " + num1);
		}
 }
}