import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		for(int i = 1; i <= 10000; i++){
			int x = sc.nextInt();
			int y = sc.nextInt();
			if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			}				
		}
	sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		for(int i = 1; i <= 10000; i++){
			int x = sc.nextInt();
			int y = sc.nextInt();
			if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			}				
		}
	sc.close();
	}
} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		for(int i = 1; i <= 10000; i++){
			int x = sc.nextInt();
			int y = sc.nextInt();
			if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			}				
		}
	sc.close();
	} main {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		for(int i = 1; i <= 10000; i++){
			int x = sc.nextInt();
			int y = sc.nextInt();
			if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			}				
		}
	sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(int i = 1; i <= 10000; i++){
			int x = sc.nextInt();
			int y = sc.nextInt();
			if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			}				
		} int i = 1; int i = 1; i 1 i <= 10000 i 10000 i++ i++ i {
			int x = sc.nextInt();
			int y = sc.nextInt();
			if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			}				
		} {
			int x = sc.nextInt();
			int y = sc.nextInt();
			if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			}				
		} int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			} x == 0 && y == 0 x == 0 x 0 y == 0 y 0 {
			break;
			} break; {
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			} System.out.println(Math.min(x, y) + " " + Math.max(x, y)) System.out.println System.out System System.out Math.min(x, y) + " " + Math.max(x, y) Math.min(x, y) + " " + Math.max(x, y) Math.min(x, y) Math.min Math x y " " Math.max(x, y) Math.max Math x y sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		for(int i = 1; i <= 10000; i++){
			int x = sc.nextInt();
			int y = sc.nextInt();
			if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			}				
		}
	sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		for(int i = 1; i <= 10000; i++){
			int x = sc.nextInt();
			int y = sc.nextInt();
			if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			}				
		}
	sc.close();
	}
} Main
import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		for(int i = 1; i <= 10000; i++){
			int x = sc.nextInt();
			int y = sc.nextInt();
			if(x == 0 && y == 0){
			break;
			}else{
				System.out.println(Math.min(x, y) + " " + Math.max(x, y));
			}				
		}
	sc.close();
	}
}