import java.util.*;
class Main {
	public static void main (String[] args) throws java.lang.Exception {
		Scanner sc = new Scanner(System.in);
		int a, b, t;
		while(true) {
			a = sc.nextInt(); b = sc.nextInt();
			if(a == 0 && b == 0) break;
			if(a > b) { t = a; a = b; b = t; }
			System.out.println(a + " " + b);
		}
	}
} import java.util.*; util.* java class Main {
	public static void main (String[] args) throws java.lang.Exception {
		Scanner sc = new Scanner(System.in);
		int a, b, t;
		while(true) {
			a = sc.nextInt(); b = sc.nextInt();
			if(a == 0 && b == 0) break;
			if(a > b) { t = a; a = b; b = t; }
			System.out.println(a + " " + b);
		}
	}
} Main public static void main (String[] args) throws java.lang.Exception {
		Scanner sc = new Scanner(System.in);
		int a, b, t;
		while(true) {
			a = sc.nextInt(); b = sc.nextInt();
			if(a == 0 && b == 0) break;
			if(a > b) { t = a; a = b; b = t; }
			System.out.println(a + " " + b);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int a, b, t;
		while(true) {
			a = sc.nextInt(); b = sc.nextInt();
			if(a == 0 && b == 0) break;
			if(a > b) { t = a; a = b; b = t; }
			System.out.println(a + " " + b);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a a b b t; t while(true) {
			a = sc.nextInt(); b = sc.nextInt();
			if(a == 0 && b == 0) break;
			if(a > b) { t = a; a = b; b = t; }
			System.out.println(a + " " + b);
		} true {
			a = sc.nextInt(); b = sc.nextInt();
			if(a == 0 && b == 0) break;
			if(a > b) { t = a; a = b; b = t; }
			System.out.println(a + " " + b);
		} a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc if(a == 0 && b == 0) break; a == 0 && b == 0 a == 0 a 0 b == 0 b 0 break; if(a > b) { t = a; a = b; b = t; } a > b a b { t = a; a = b; b = t; } t = a t a a = b a b b = t b t System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b String[] args args
import java.util.*;
class Main {
	public static void main (String[] args) throws java.lang.Exception {
		Scanner sc = new Scanner(System.in);
		int a, b, t;
		while(true) {
			a = sc.nextInt(); b = sc.nextInt();
			if(a == 0 && b == 0) break;
			if(a > b) { t = a; a = b; b = t; }
			System.out.println(a + " " + b);
		}
	}
}