import java.util.Arrays;
import java.util.Scanner;

public class Main{
	public static void main(String args[]){

		
		Scanner sc = new Scanner(System.in);
		int intX = -1;
		int intY = -1;

		for(int i = 0; i < 3000; i++){


			intX = sc.nextInt();
			intY = sc.nextInt();

			if((intX == 0) && (intY == 0)){
				break;
			}

			int[] arr = new int[]{intX,intY};
			Arrays.sort(arr);

			System.out.println(arr[0] + " " + arr[1]);

		}
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String args[]){

		
		Scanner sc = new Scanner(System.in);
		int intX = -1;
		int intY = -1;

		for(int i = 0; i < 3000; i++){


			intX = sc.nextInt();
			intY = sc.nextInt();

			if((intX == 0) && (intY == 0)){
				break;
			}

			int[] arr = new int[]{intX,intY};
			Arrays.sort(arr);

			System.out.println(arr[0] + " " + arr[1]);

		}
	}
} Main public static void main(String args[]){

		
		Scanner sc = new Scanner(System.in);
		int intX = -1;
		int intY = -1;

		for(int i = 0; i < 3000; i++){


			intX = sc.nextInt();
			intY = sc.nextInt();

			if((intX == 0) && (intY == 0)){
				break;
			}

			int[] arr = new int[]{intX,intY};
			Arrays.sort(arr);

			System.out.println(arr[0] + " " + arr[1]);

		}
	} main {

		
		Scanner sc = new Scanner(System.in);
		int intX = -1;
		int intY = -1;

		for(int i = 0; i < 3000; i++){


			intX = sc.nextInt();
			intY = sc.nextInt();

			if((intX == 0) && (intY == 0)){
				break;
			}

			int[] arr = new int[]{intX,intY};
			Arrays.sort(arr);

			System.out.println(arr[0] + " " + arr[1]);

		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int intX = -1; intX -1 1 int intY = -1; intY -1 1 for(int i = 0; i < 3000; i++){


			intX = sc.nextInt();
			intY = sc.nextInt();

			if((intX == 0) && (intY == 0)){
				break;
			}

			int[] arr = new int[]{intX,intY};
			Arrays.sort(arr);

			System.out.println(arr[0] + " " + arr[1]);

		} int i = 0; int i = 0; i 0 i < 3000 i 3000 i++ i++ i {


			intX = sc.nextInt();
			intY = sc.nextInt();

			if((intX == 0) && (intY == 0)){
				break;
			}

			int[] arr = new int[]{intX,intY};
			Arrays.sort(arr);

			System.out.println(arr[0] + " " + arr[1]);

		} {


			intX = sc.nextInt();
			intY = sc.nextInt();

			if((intX == 0) && (intY == 0)){
				break;
			}

			int[] arr = new int[]{intX,intY};
			Arrays.sort(arr);

			System.out.println(arr[0] + " " + arr[1]);

		} intX = sc.nextInt() intX sc.nextInt() sc.nextInt sc intY = sc.nextInt() intY sc.nextInt() sc.nextInt sc if((intX == 0) && (intY == 0)){
				break;
			} (intX == 0) && (intY == 0) (intX == 0) intX 0 (intY == 0) intY 0 {
				break;
			} break; int[] arr = new int[]{intX,intY}; arr new int[]{intX,intY} Arrays.sort(arr) Arrays.sort Arrays arr System.out.println(arr[0] + " " + arr[1]) System.out.println System.out System System.out arr[0] + " " + arr[1] arr[0] + " " + arr[1] arr[0] arr 0 " " arr[1] arr 1 String args[] args public class Main{
	public static void main(String args[]){

		
		Scanner sc = new Scanner(System.in);
		int intX = -1;
		int intY = -1;

		for(int i = 0; i < 3000; i++){


			intX = sc.nextInt();
			intY = sc.nextInt();

			if((intX == 0) && (intY == 0)){
				break;
			}

			int[] arr = new int[]{intX,intY};
			Arrays.sort(arr);

			System.out.println(arr[0] + " " + arr[1]);

		}
	}
} public class Main{
	public static void main(String args[]){

		
		Scanner sc = new Scanner(System.in);
		int intX = -1;
		int intY = -1;

		for(int i = 0; i < 3000; i++){


			intX = sc.nextInt();
			intY = sc.nextInt();

			if((intX == 0) && (intY == 0)){
				break;
			}

			int[] arr = new int[]{intX,intY};
			Arrays.sort(arr);

			System.out.println(arr[0] + " " + arr[1]);

		}
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main{
	public static void main(String args[]){

		
		Scanner sc = new Scanner(System.in);
		int intX = -1;
		int intY = -1;

		for(int i = 0; i < 3000; i++){


			intX = sc.nextInt();
			intY = sc.nextInt();

			if((intX == 0) && (intY == 0)){
				break;
			}

			int[] arr = new int[]{intX,intY};
			Arrays.sort(arr);

			System.out.println(arr[0] + " " + arr[1]);

		}
	}
}