import java.util.Scanner;

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

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