import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		
		Scanner n = new Scanner(System.in);
		int a=n.nextInt();
		int b=n.nextInt();
		while (a != 0 || b != 0){
			
			if (a>b){
				System.out.println(b+" "+a);
			}else{System.out.println(a+" "+b);
			}
			a=n.nextInt();
			b=n.nextInt();
		}
	}

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

	public static void main(String[] args) {
		
		Scanner n = new Scanner(System.in);
		int a=n.nextInt();
		int b=n.nextInt();
		while (a != 0 || b != 0){
			
			if (a>b){
				System.out.println(b+" "+a);
			}else{System.out.println(a+" "+b);
			}
			a=n.nextInt();
			b=n.nextInt();
		}
	}

} Main public static void main(String[] args) {
		
		Scanner n = new Scanner(System.in);
		int a=n.nextInt();
		int b=n.nextInt();
		while (a != 0 || b != 0){
			
			if (a>b){
				System.out.println(b+" "+a);
			}else{System.out.println(a+" "+b);
			}
			a=n.nextInt();
			b=n.nextInt();
		}
	} main {
		
		Scanner n = new Scanner(System.in);
		int a=n.nextInt();
		int b=n.nextInt();
		while (a != 0 || b != 0){
			
			if (a>b){
				System.out.println(b+" "+a);
			}else{System.out.println(a+" "+b);
			}
			a=n.nextInt();
			b=n.nextInt();
		}
	} Scanner n = new Scanner(System.in); n new Scanner(System.in) int a=n.nextInt(); a n.nextInt() n.nextInt n int b=n.nextInt(); b n.nextInt() n.nextInt n while (a != 0 || b != 0){
			
			if (a>b){
				System.out.println(b+" "+a);
			}else{System.out.println(a+" "+b);
			}
			a=n.nextInt();
			b=n.nextInt();
		} a != 0 || b != 0 a != 0 a 0 b != 0 b 0 {
			
			if (a>b){
				System.out.println(b+" "+a);
			}else{System.out.println(a+" "+b);
			}
			a=n.nextInt();
			b=n.nextInt();
		} if (a>b){
				System.out.println(b+" "+a);
			}else{System.out.println(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 {System.out.println(a+" "+b);
			} System.out.println(a+" "+b) System.out.println System.out System System.out a+" "+b a+" "+b a " " b a=n.nextInt() a n.nextInt() n.nextInt n b=n.nextInt() b n.nextInt() n.nextInt n String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner n = new Scanner(System.in);
		int a=n.nextInt();
		int b=n.nextInt();
		while (a != 0 || b != 0){
			
			if (a>b){
				System.out.println(b+" "+a);
			}else{System.out.println(a+" "+b);
			}
			a=n.nextInt();
			b=n.nextInt();
		}
	}

} public class Main {

	public static void main(String[] args) {
		
		Scanner n = new Scanner(System.in);
		int a=n.nextInt();
		int b=n.nextInt();
		while (a != 0 || b != 0){
			
			if (a>b){
				System.out.println(b+" "+a);
			}else{System.out.println(a+" "+b);
			}
			a=n.nextInt();
			b=n.nextInt();
		}
	}

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

	public static void main(String[] args) {
		
		Scanner n = new Scanner(System.in);
		int a=n.nextInt();
		int b=n.nextInt();
		while (a != 0 || b != 0){
			
			if (a>b){
				System.out.println(b+" "+a);
			}else{System.out.println(a+" "+b);
			}
			a=n.nextInt();
			b=n.nextInt();
		}
	}

}