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));
		String str = br.readLine();
		String strArray[] = str.split(" ");

		int a = Integer.parseInt(strArray[0]);
		int b = Integer.parseInt(strArray[1]);
		for(int i = 0; i<3000; i++){
			if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			}
		}
	}
} 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));
		String str = br.readLine();
		String strArray[] = str.split(" ");

		int a = Integer.parseInt(strArray[0]);
		int b = Integer.parseInt(strArray[1]);
		for(int i = 0; i<3000; i++){
			if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			}
		}
	}
} Main public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		String strArray[] = str.split(" ");

		int a = Integer.parseInt(strArray[0]);
		int b = Integer.parseInt(strArray[1]);
		for(int i = 0; i<3000; i++){
			if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			}
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		String strArray[] = str.split(" ");

		int a = Integer.parseInt(strArray[0]);
		int b = Integer.parseInt(strArray[1]);
		for(int i = 0; i<3000; i++){
			if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br String strArray[] = str.split(" "); strArray str.split(" ") str.split str " " int a = Integer.parseInt(strArray[0]); a Integer.parseInt(strArray[0]) Integer.parseInt Integer strArray[0] strArray 0 int b = Integer.parseInt(strArray[1]); b Integer.parseInt(strArray[1]) Integer.parseInt Integer strArray[1] strArray 1 for(int i = 0; i<3000; i++){
			if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			}
		} int i = 0; int i = 0; i 0 i<3000 i 3000 i++ i++ i {
			if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			}
		} {
			if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			}
		} if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			} a==0 && b==0 a==0 a 0 b==0 b 0 {
				break;
			} break; {
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			} if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		} a<b a b {
			System.out.println(a + " " + b);
		} System.out.println(a + " " + b) System.out.println System.out System System.out 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 strArray[0] = null strArray[0] strArray 0 null strArray[1] = null strArray[1] strArray 1 null str = br.readLine() str br.readLine() br.readLine br strArray = str.split(" ") strArray str.split(" ") str.split str " " a = Integer.parseInt(strArray[0]) a Integer.parseInt(strArray[0]) Integer.parseInt Integer strArray[0] strArray 0 b = Integer.parseInt(strArray[1]) b Integer.parseInt(strArray[1]) Integer.parseInt Integer strArray[1] strArray 1 String[] args args public class Main {

	public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		String strArray[] = str.split(" ");

		int a = Integer.parseInt(strArray[0]);
		int b = Integer.parseInt(strArray[1]);
		for(int i = 0; i<3000; i++){
			if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			}
		}
	}
} public class Main {

	public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		String strArray[] = str.split(" ");

		int a = Integer.parseInt(strArray[0]);
		int b = Integer.parseInt(strArray[1]);
		for(int i = 0; i<3000; i++){
			if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			}
		}
	}
} 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));
		String str = br.readLine();
		String strArray[] = str.split(" ");

		int a = Integer.parseInt(strArray[0]);
		int b = Integer.parseInt(strArray[1]);
		for(int i = 0; i<3000; i++){
			if(a==0 && b==0){
				break;
			}else{
		if(a<b){
			System.out.println(a + " " + b);
		}else{
			System.out.println(b + " " + a);
		}
		strArray[0] = null;
		strArray[1] = null;
		str = br.readLine();
		strArray = str.split(" ");
		 a = Integer.parseInt(strArray[0]);
		b = Integer.parseInt(strArray[1]);
			}
		}
	}
}