import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		for(;;){
			int x = scan.nextInt();
			int y = scan.nextInt();
			if((x == 0) && (y == 0)){
				break;
			}
			if(x > y){
				int work = x;
				x = y;
				y = work;
			}
			listX.add(x);
			listY.add(y);
		}

		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{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		for(;;){
			int x = scan.nextInt();
			int y = scan.nextInt();
			if((x == 0) && (y == 0)){
				break;
			}
			if(x > y){
				int work = x;
				x = y;
				y = work;
			}
			listX.add(x);
			listY.add(y);
		}

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

		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>();
		for(;;){
			int x = scan.nextInt();
			int y = scan.nextInt();
			if((x == 0) && (y == 0)){
				break;
			}
			if(x > y){
				int work = x;
				x = y;
				y = work;
			}
			listX.add(x);
			listY.add(y);
		}

		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>() for(;;){
			int x = scan.nextInt();
			int y = scan.nextInt();
			if((x == 0) && (y == 0)){
				break;
			}
			if(x > y){
				int work = x;
				x = y;
				y = work;
			}
			listX.add(x);
			listY.add(y);
		} ; {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if((x == 0) && (y == 0)){
				break;
			}
			if(x > y){
				int work = x;
				x = y;
				y = work;
			}
			listX.add(x);
			listY.add(y);
		} {
			int x = scan.nextInt();
			int y = scan.nextInt();
			if((x == 0) && (y == 0)){
				break;
			}
			if(x > y){
				int work = x;
				x = y;
				y = work;
			}
			listX.add(x);
			listY.add(y);
		} int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan if((x == 0) && (y == 0)){
				break;
			} (x == 0) && (y == 0) (x == 0) x 0 (y == 0) y 0 {
				break;
			} break; if(x > y){
				int work = x;
				x = y;
				y = work;
			} x > y x y {
				int work = x;
				x = y;
				y = work;
			} int work = x; work x x = y x y y = work y work listX.add(x) listX.add listX x listY.add(y) listY.add listY y 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{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		for(;;){
			int x = scan.nextInt();
			int y = scan.nextInt();
			if((x == 0) && (y == 0)){
				break;
			}
			if(x > y){
				int work = x;
				x = y;
				y = work;
			}
			listX.add(x);
			listY.add(y);
		}

		for(int i = 0; i < listX.size(); i++){
			System.out.printf("%d %d\n", listX.get(i), listY.get(i));
		}
	}
} public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		for(;;){
			int x = scan.nextInt();
			int y = scan.nextInt();
			if((x == 0) && (y == 0)){
				break;
			}
			if(x > y){
				int work = x;
				x = y;
				y = work;
			}
			listX.add(x);
			listY.add(y);
		}

		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{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listX = new ArrayList<Integer>();
		List<Integer> listY = new ArrayList<Integer>();
		for(;;){
			int x = scan.nextInt();
			int y = scan.nextInt();
			if((x == 0) && (y == 0)){
				break;
			}
			if(x > y){
				int work = x;
				x = y;
				y = work;
			}
			listX.add(x);
			listY.add(y);
		}

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