import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int count = 0;

		while(count < 3000){
			String str = br.readLine();
			String[] s = str.split(" ");

			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);

			if((0 <= a) && (b <= 10000)){
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int count = 0;

		while(count < 3000){
			String str = br.readLine();
			String[] s = str.split(" ");

			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);

			if((0 <= a) && (b <= 10000)){
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			}
		}
	}
} Main public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int count = 0;

		while(count < 3000){
			String str = br.readLine();
			String[] s = str.split(" ");

			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);

			if((0 <= a) && (b <= 10000)){
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			}
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int count = 0;

		while(count < 3000){
			String str = br.readLine();
			String[] s = str.split(" ");

			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);

			if((0 <= a) && (b <= 10000)){
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int count = 0; count 0 while(count < 3000){
			String str = br.readLine();
			String[] s = str.split(" ");

			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);

			if((0 <= a) && (b <= 10000)){
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			}
		} count < 3000 count 3000 {
			String str = br.readLine();
			String[] s = str.split(" ");

			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);

			if((0 <= a) && (b <= 10000)){
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			}
		} String str = br.readLine(); str br.readLine() br.readLine br String[] s = str.split(" "); s str.split(" ") str.split str " " int a = Integer.parseInt(s[0]); a Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 int b = Integer.parseInt(s[1]); b Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 if((0 <= a) && (b <= 10000)){
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			} (0 <= a) && (b <= 10000) (0 <= a) 0 a (b <= 10000) b 10000 {
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			} if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				} (a == 0)&&(b == 0) (a == 0) a 0 (b == 0) b 0 {
					break;
				} break; if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				} a > b a b {
					System.out.println(b +" "+a);
					count++;
					continue;

				} System.out.println(b +" "+a) System.out.println System.out System System.out b +" "+a b +" "+a b " " a count++ count continue; {
					System.out.println(a +" "+b);
					count++;
					continue;
				} System.out.println(a +" "+b) System.out.println System.out System System.out a +" "+b a +" "+b a " " b count++ count continue; String[] args args public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int count = 0;

		while(count < 3000){
			String str = br.readLine();
			String[] s = str.split(" ");

			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);

			if((0 <= a) && (b <= 10000)){
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			}
		}
	}
} public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int count = 0;

		while(count < 3000){
			String str = br.readLine();
			String[] s = str.split(" ");

			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);

			if((0 <= a) && (b <= 10000)){
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			}
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int count = 0;

		while(count < 3000){
			String str = br.readLine();
			String[] s = str.split(" ");

			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);

			if((0 <= a) && (b <= 10000)){
				if((a == 0)&&(b == 0)){
					break;
				}else if(a > b){
					System.out.println(b +" "+a);
					count++;
					continue;

				}else{
					System.out.println(a +" "+b);
					count++;
					continue;
				}
			}
		}
	}
}