import java.util.*;

public class Main{
	public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		Scanner scan = new Scanner(System.in);
		int tmpX,tmpY;
		for(;;){
			tmpX = scan.nextInt();
			tmpY = scan.nextInt();
			if((tmpX == 0) && (tmpY == 0)){
				break;
			}
			if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			}
			listX.add(tmpX);
			listY.add(tmpY);
		}

		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			}
		}
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		Scanner scan = new Scanner(System.in);
		int tmpX,tmpY;
		for(;;){
			tmpX = scan.nextInt();
			tmpY = scan.nextInt();
			if((tmpX == 0) && (tmpY == 0)){
				break;
			}
			if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			}
			listX.add(tmpX);
			listY.add(tmpY);
		}

		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			}
		}
	}
} Main public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		Scanner scan = new Scanner(System.in);
		int tmpX,tmpY;
		for(;;){
			tmpX = scan.nextInt();
			tmpY = scan.nextInt();
			if((tmpX == 0) && (tmpY == 0)){
				break;
			}
			if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			}
			listX.add(tmpX);
			listY.add(tmpY);
		}

		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			}
		}
	} main {
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		Scanner scan = new Scanner(System.in);
		int tmpX,tmpY;
		for(;;){
			tmpX = scan.nextInt();
			tmpY = scan.nextInt();
			if((tmpX == 0) && (tmpY == 0)){
				break;
			}
			if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			}
			listX.add(tmpX);
			listY.add(tmpY);
		}

		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			}
		}
	} List<Integer> listX = new ArrayList<Integer>(); listX new ArrayList<Integer>() List<Integer> listY = new ArrayList<Integer>(); listY new ArrayList<Integer>() Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int tmpX tmpX tmpY; tmpY for(;;){
			tmpX = scan.nextInt();
			tmpY = scan.nextInt();
			if((tmpX == 0) && (tmpY == 0)){
				break;
			}
			if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			}
			listX.add(tmpX);
			listY.add(tmpY);
		} ; {
			tmpX = scan.nextInt();
			tmpY = scan.nextInt();
			if((tmpX == 0) && (tmpY == 0)){
				break;
			}
			if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			}
			listX.add(tmpX);
			listY.add(tmpY);
		} {
			tmpX = scan.nextInt();
			tmpY = scan.nextInt();
			if((tmpX == 0) && (tmpY == 0)){
				break;
			}
			if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			}
			listX.add(tmpX);
			listY.add(tmpY);
		} tmpX = scan.nextInt() tmpX scan.nextInt() scan.nextInt scan tmpY = scan.nextInt() tmpY scan.nextInt() scan.nextInt scan if((tmpX == 0) && (tmpY == 0)){
				break;
			} (tmpX == 0) && (tmpY == 0) (tmpX == 0) tmpX 0 (tmpY == 0) tmpY 0 {
				break;
			} break; if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			} tmpX > tmpY tmpX tmpY {
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			} int small = tmpY; small tmpY tmpY = tmpX tmpY tmpX tmpX = small tmpX small listX.add(tmpX) listX.add listX tmpX listY.add(tmpY) listY.add listY tmpY if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			}
		} listX.size() != 0 listX.size() listX.size listX 0 {
			for(int i = 0; i < listX.size(); i++){
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			}
		} for(int i = 0; i < listX.size(); i++){
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			} int i = 0; int i = 0; i 0 i < listX.size() i listX.size() listX.size listX i++ i++ i {
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			} {
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			} System.out.printf("%d %d\n", listX.get(i), listY.get(i)) System.out.printf System.out System System.out "%d %d\n" listX.get(i) listX.get listX i listY.get(i) listY.get listY i String[] args args public class Main{
	public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		Scanner scan = new Scanner(System.in);
		int tmpX,tmpY;
		for(;;){
			tmpX = scan.nextInt();
			tmpY = scan.nextInt();
			if((tmpX == 0) && (tmpY == 0)){
				break;
			}
			if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			}
			listX.add(tmpX);
			listY.add(tmpY);
		}

		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			}
		}
	}
} public class Main{
	public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		Scanner scan = new Scanner(System.in);
		int tmpX,tmpY;
		for(;;){
			tmpX = scan.nextInt();
			tmpY = scan.nextInt();
			if((tmpX == 0) && (tmpY == 0)){
				break;
			}
			if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			}
			listX.add(tmpX);
			listY.add(tmpY);
		}

		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			}
		}
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		Scanner scan = new Scanner(System.in);
		int tmpX,tmpY;
		for(;;){
			tmpX = scan.nextInt();
			tmpY = scan.nextInt();
			if((tmpX == 0) && (tmpY == 0)){
				break;
			}
			if(tmpX > tmpY){
				int small = tmpY;
				tmpY = tmpX;
				tmpX = small;
			}
			listX.add(tmpX);
			listY.add(tmpY);
		}

		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.printf("%d %d\n", listX.get(i), listY.get(i));
			}
		}
	}
}