import java.util.Scanner;

public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
	    int x, y ,min;
	    for(;;) {
	    	x = s.nextInt();
	 	    y = s.nextInt();
	    	if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x);
	    }
	    
	}
	public static void main(String[] args) {
		
		new Main().run();
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
	    int x, y ,min;
	    for(;;) {
	    	x = s.nextInt();
	 	    y = s.nextInt();
	    	if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x);
	    }
	    
	}
	public static void main(String[] args) {
		
		new Main().run();
		
	}
} Main void run(){
		Scanner s = new Scanner(System.in);
	    int x, y ,min;
	    for(;;) {
	    	x = s.nextInt();
	 	    y = s.nextInt();
	    	if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x);
	    }
	    
	} run {
		Scanner s = new Scanner(System.in);
	    int x, y ,min;
	    for(;;) {
	    	x = s.nextInt();
	 	    y = s.nextInt();
	    	if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x);
	    }
	    
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int x x y y min; min for(;;) {
	    	x = s.nextInt();
	 	    y = s.nextInt();
	    	if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x);
	    } ; {
	    	x = s.nextInt();
	 	    y = s.nextInt();
	    	if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x);
	    } {
	    	x = s.nextInt();
	 	    y = s.nextInt();
	    	if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x);
	    } x = s.nextInt() x s.nextInt() s.nextInt s y = s.nextInt() y s.nextInt() s.nextInt s if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x); x == 0 && y == 0 x == 0 x 0 y == 0 y 0 break; if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x); x < y x y System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y System.out.println(y + " " + x) System.out.println System.out System System.out y + " " + x y + " " + x y " " x public static void main(String[] args) {
		
		new Main().run();
		
	} main {
		
		new Main().run();
		
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
	    int x, y ,min;
	    for(;;) {
	    	x = s.nextInt();
	 	    y = s.nextInt();
	    	if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x);
	    }
	    
	}
	public static void main(String[] args) {
		
		new Main().run();
		
	}
} public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
	    int x, y ,min;
	    for(;;) {
	    	x = s.nextInt();
	 	    y = s.nextInt();
	    	if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x);
	    }
	    
	}
	public static void main(String[] args) {
		
		new Main().run();
		
	}
} Main
import java.util.Scanner;

public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
	    int x, y ,min;
	    for(;;) {
	    	x = s.nextInt();
	 	    y = s.nextInt();
	    	if(x == 0 && y == 0) break;
	    	else if(x < y) System.out.println(x + " " + y);
	    	else  System.out.println(y + " " + x);
	    }
	    
	}
	public static void main(String[] args) {
		
		new Main().run();
		
	}
}