//Swapping Two Numbers
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String input;
		String[] xy;
		int x;
		int y;
		
		while (!(input = in.readLine()).equals("0 0")){
			
			xy = input.split(" ");
			x = Integer.parseInt(xy[0]);
			y = Integer.parseInt(xy[1]);
			
			if(x <= y ){
				System.out.println(x +" " +y);
			}else{
				System.out.println(y +" " +x);
			}
			
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String input;
		String[] xy;
		int x;
		int y;
		
		while (!(input = in.readLine()).equals("0 0")){
			
			xy = input.split(" ");
			x = Integer.parseInt(xy[0]);
			y = Integer.parseInt(xy[1]);
			
			if(x <= y ){
				System.out.println(x +" " +y);
			}else{
				System.out.println(y +" " +x);
			}
			
		}
	}
} Main public static void main(String[] args) throws IOException {

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String input;
		String[] xy;
		int x;
		int y;
		
		while (!(input = in.readLine()).equals("0 0")){
			
			xy = input.split(" ");
			x = Integer.parseInt(xy[0]);
			y = Integer.parseInt(xy[1]);
			
			if(x <= y ){
				System.out.println(x +" " +y);
			}else{
				System.out.println(y +" " +x);
			}
			
		}
	} main {

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String input;
		String[] xy;
		int x;
		int y;
		
		while (!(input = in.readLine()).equals("0 0")){
			
			xy = input.split(" ");
			x = Integer.parseInt(xy[0]);
			y = Integer.parseInt(xy[1]);
			
			if(x <= y ){
				System.out.println(x +" " +y);
			}else{
				System.out.println(y +" " +x);
			}
			
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String input; input String[] xy; xy int x; x int y; y while (!(input = in.readLine()).equals("0 0")){
			
			xy = input.split(" ");
			x = Integer.parseInt(xy[0]);
			y = Integer.parseInt(xy[1]);
			
			if(x <= y ){
				System.out.println(x +" " +y);
			}else{
				System.out.println(y +" " +x);
			}
			
		} !(input = in.readLine()).equals("0 0") (input = in.readLine()).equals("0 0") (input = in.readLine()).equals (input = in.readLine()) input in.readLine() in.readLine in "0 0" {
			
			xy = input.split(" ");
			x = Integer.parseInt(xy[0]);
			y = Integer.parseInt(xy[1]);
			
			if(x <= y ){
				System.out.println(x +" " +y);
			}else{
				System.out.println(y +" " +x);
			}
			
		} xy = input.split(" ") xy input.split(" ") input.split input " " x = Integer.parseInt(xy[0]) x Integer.parseInt(xy[0]) Integer.parseInt Integer xy[0] xy 0 y = Integer.parseInt(xy[1]) y Integer.parseInt(xy[1]) Integer.parseInt Integer xy[1] xy 1 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(x +" " +y) System.out.println System.out System System.out x +" " +y x +" " +y x " " y {
				System.out.println(y +" " +x);
			} System.out.println(y +" " +x) System.out.println System.out System System.out y +" " +x y +" " +x y " " x String[] args args
//Swapping Two Numbers
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String input;
		String[] xy;
		int x;
		int y;
		
		while (!(input = in.readLine()).equals("0 0")){
			
			xy = input.split(" ");
			x = Integer.parseInt(xy[0]);
			y = Integer.parseInt(xy[1]);
			
			if(x <= y ){
				System.out.println(x +" " +y);
			}else{
				System.out.println(y +" " +x);
			}
			
		}
	}
}