import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		List<Integer> arraylistX = new ArrayList<Integer>();
		List<Integer> arraylistY = new ArrayList<Integer>();
		int lastAddX;
		int lastAddY;
		do {
			lastAddX = stdIn.nextInt();
			lastAddY = stdIn.nextInt();
			arraylistX.add(lastAddX);
			arraylistY.add(lastAddY);
			
		}while(lastAddX != 0 || lastAddY != 0);
		
		for(int i = 0; i < arraylistX.size()-1; i++) {
			if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			}
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		List<Integer> arraylistX = new ArrayList<Integer>();
		List<Integer> arraylistY = new ArrayList<Integer>();
		int lastAddX;
		int lastAddY;
		do {
			lastAddX = stdIn.nextInt();
			lastAddY = stdIn.nextInt();
			arraylistX.add(lastAddX);
			arraylistY.add(lastAddY);
			
		}while(lastAddX != 0 || lastAddY != 0);
		
		for(int i = 0; i < arraylistX.size()-1; i++) {
			if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		List<Integer> arraylistX = new ArrayList<Integer>();
		List<Integer> arraylistY = new ArrayList<Integer>();
		int lastAddX;
		int lastAddY;
		do {
			lastAddX = stdIn.nextInt();
			lastAddY = stdIn.nextInt();
			arraylistX.add(lastAddX);
			arraylistY.add(lastAddY);
			
		}while(lastAddX != 0 || lastAddY != 0);
		
		for(int i = 0; i < arraylistX.size()-1; i++) {
			if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			}
		}
	} main {
		Scanner stdIn = new Scanner(System.in);
		List<Integer> arraylistX = new ArrayList<Integer>();
		List<Integer> arraylistY = new ArrayList<Integer>();
		int lastAddX;
		int lastAddY;
		do {
			lastAddX = stdIn.nextInt();
			lastAddY = stdIn.nextInt();
			arraylistX.add(lastAddX);
			arraylistY.add(lastAddY);
			
		}while(lastAddX != 0 || lastAddY != 0);
		
		for(int i = 0; i < arraylistX.size()-1; i++) {
			if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			}
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) List<Integer> arraylistX = new ArrayList<Integer>(); arraylistX new ArrayList<Integer>() List<Integer> arraylistY = new ArrayList<Integer>(); arraylistY new ArrayList<Integer>() int lastAddX; lastAddX int lastAddY; lastAddY do {
			lastAddX = stdIn.nextInt();
			lastAddY = stdIn.nextInt();
			arraylistX.add(lastAddX);
			arraylistY.add(lastAddY);
			
		}while(lastAddX != 0 || lastAddY != 0); lastAddX != 0 || lastAddY != 0 lastAddX != 0 lastAddX 0 lastAddY != 0 lastAddY 0 {
			lastAddX = stdIn.nextInt();
			lastAddY = stdIn.nextInt();
			arraylistX.add(lastAddX);
			arraylistY.add(lastAddY);
			
		} lastAddX = stdIn.nextInt() lastAddX stdIn.nextInt() stdIn.nextInt stdIn lastAddY = stdIn.nextInt() lastAddY stdIn.nextInt() stdIn.nextInt stdIn arraylistX.add(lastAddX) arraylistX.add arraylistX lastAddX arraylistY.add(lastAddY) arraylistY.add arraylistY lastAddY for(int i = 0; i < arraylistX.size()-1; i++) {
			if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			}
		} int i = 0; int i = 0; i 0 i < arraylistX.size()-1 i arraylistX.size()-1 arraylistX.size() arraylistX.size arraylistX 1 i++ i++ i {
			if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			}
		} {
			if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			}
		} if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			} arraylistX.get(i) < arraylistY.get(i) arraylistX.get(i) arraylistX.get arraylistX i arraylistY.get(i) arraylistY.get arraylistY i {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			} System.out.println(arraylistX.get(i) + " " + arraylistY.get(i)) System.out.println System.out System System.out arraylistX.get(i) + " " + arraylistY.get(i) arraylistX.get(i) + " " + arraylistY.get(i) arraylistX.get(i) arraylistX.get arraylistX i " " arraylistY.get(i) arraylistY.get arraylistY i {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			} System.out.println(arraylistY.get(i) + " " + arraylistX.get(i)) System.out.println System.out System System.out arraylistY.get(i) + " " + arraylistX.get(i) arraylistY.get(i) + " " + arraylistX.get(i) arraylistY.get(i) arraylistY.get arraylistY i " " arraylistX.get(i) arraylistX.get arraylistX i String[] args args public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		List<Integer> arraylistX = new ArrayList<Integer>();
		List<Integer> arraylistY = new ArrayList<Integer>();
		int lastAddX;
		int lastAddY;
		do {
			lastAddX = stdIn.nextInt();
			lastAddY = stdIn.nextInt();
			arraylistX.add(lastAddX);
			arraylistY.add(lastAddY);
			
		}while(lastAddX != 0 || lastAddY != 0);
		
		for(int i = 0; i < arraylistX.size()-1; i++) {
			if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			}
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		List<Integer> arraylistX = new ArrayList<Integer>();
		List<Integer> arraylistY = new ArrayList<Integer>();
		int lastAddX;
		int lastAddY;
		do {
			lastAddX = stdIn.nextInt();
			lastAddY = stdIn.nextInt();
			arraylistX.add(lastAddX);
			arraylistY.add(lastAddY);
			
		}while(lastAddX != 0 || lastAddY != 0);
		
		for(int i = 0; i < arraylistX.size()-1; i++) {
			if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			}
		}
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		List<Integer> arraylistX = new ArrayList<Integer>();
		List<Integer> arraylistY = new ArrayList<Integer>();
		int lastAddX;
		int lastAddY;
		do {
			lastAddX = stdIn.nextInt();
			lastAddY = stdIn.nextInt();
			arraylistX.add(lastAddX);
			arraylistY.add(lastAddY);
			
		}while(lastAddX != 0 || lastAddY != 0);
		
		for(int i = 0; i < arraylistX.size()-1; i++) {
			if(arraylistX.get(i) < arraylistY.get(i)) {
				System.out.println(arraylistX.get(i) + " " + arraylistY.get(i));
			}
			else {
				System.out.println(arraylistY.get(i) + " " + arraylistX.get(i));
			}
		}
	}
}