import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		while(true){
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			if(x==0 && y==0)
				break;
			System.out.println(x<y?(x+" "+y):(y+" "+x));
		}
	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		while(true){
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			if(x==0 && y==0)
				break;
			System.out.println(x<y?(x+" "+y):(y+" "+x));
		}
	}
} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		while(true){
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			if(x==0 && y==0)
				break;
			System.out.println(x<y?(x+" "+y):(y+" "+x));
		}
	} main {
		Scanner stdIn = new Scanner(System.in);
		while(true){
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			if(x==0 && y==0)
				break;
			System.out.println(x<y?(x+" "+y):(y+" "+x));
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) while(true){
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			if(x==0 && y==0)
				break;
			System.out.println(x<y?(x+" "+y):(y+" "+x));
		} true {
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			if(x==0 && y==0)
				break;
			System.out.println(x<y?(x+" "+y):(y+" "+x));
		} int x = stdIn.nextInt(); x stdIn.nextInt() stdIn.nextInt stdIn int y = stdIn.nextInt(); y stdIn.nextInt() stdIn.nextInt stdIn if(x==0 && y==0)
				break; x==0 && y==0 x==0 x 0 y==0 y 0 break; System.out.println(x<y?(x+" "+y):(y+" "+x)) System.out.println System.out System System.out x<y?(x+" "+y):(y+" "+x) x<y x y (x+" "+y) x+" "+y x " " y (y+" "+x) y+" "+x y " " x String[] args args
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		while(true){
			int x = stdIn.nextInt();
			int y = stdIn.nextInt();
			if(x==0 && y==0)
				break;
			System.out.println(x<y?(x+" "+y):(y+" "+x));
		}
	}
}