import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		ArrayList<Integer> listX = new ArrayList<Integer>();
		ArrayList<Integer> listY = new ArrayList<Integer>();
		int intTempX;
		int intTempY;

		while(scan.hasNext()){
			intTempX = scan.nextInt();
			intTempY = scan.nextInt();
			if(intTempX == 0 && intTempY == 0){
				scan.close();
				break;
			}else if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			}
		}
		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.println(listY.get(i) + " " + listX.get(i));
			}
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		ArrayList<Integer> listX = new ArrayList<Integer>();
		ArrayList<Integer> listY = new ArrayList<Integer>();
		int intTempX;
		int intTempY;

		while(scan.hasNext()){
			intTempX = scan.nextInt();
			intTempY = scan.nextInt();
			if(intTempX == 0 && intTempY == 0){
				scan.close();
				break;
			}else if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			}
		}
		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.println(listY.get(i) + " " + listX.get(i));
			}
		}
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		ArrayList<Integer> listX = new ArrayList<Integer>();
		ArrayList<Integer> listY = new ArrayList<Integer>();
		int intTempX;
		int intTempY;

		while(scan.hasNext()){
			intTempX = scan.nextInt();
			intTempY = scan.nextInt();
			if(intTempX == 0 && intTempY == 0){
				scan.close();
				break;
			}else if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			}
		}
		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.println(listY.get(i) + " " + listX.get(i));
			}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		ArrayList<Integer> listX = new ArrayList<Integer>();
		ArrayList<Integer> listY = new ArrayList<Integer>();
		int intTempX;
		int intTempY;

		while(scan.hasNext()){
			intTempX = scan.nextInt();
			intTempY = scan.nextInt();
			if(intTempX == 0 && intTempY == 0){
				scan.close();
				break;
			}else if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			}
		}
		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.println(listY.get(i) + " " + listX.get(i));
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) ArrayList<Integer> listX = new ArrayList<Integer>(); listX new ArrayList<Integer>() ArrayList<Integer> listY = new ArrayList<Integer>(); listY new ArrayList<Integer>() int intTempX; intTempX int intTempY; intTempY while(scan.hasNext()){
			intTempX = scan.nextInt();
			intTempY = scan.nextInt();
			if(intTempX == 0 && intTempY == 0){
				scan.close();
				break;
			}else if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			}
		} scan.hasNext() scan.hasNext scan {
			intTempX = scan.nextInt();
			intTempY = scan.nextInt();
			if(intTempX == 0 && intTempY == 0){
				scan.close();
				break;
			}else if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			}
		} intTempX = scan.nextInt() intTempX scan.nextInt() scan.nextInt scan intTempY = scan.nextInt() intTempY scan.nextInt() scan.nextInt scan if(intTempX == 0 && intTempY == 0){
				scan.close();
				break;
			}else if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			} intTempX == 0 && intTempY == 0 intTempX == 0 intTempX 0 intTempY == 0 intTempY 0 {
				scan.close();
				break;
			} scan.close() scan.close scan break; if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			} intTempX < intTempY intTempX intTempY {
				listX.add(intTempY);
				listY.add(intTempX);
			} listX.add(intTempY) listX.add listX intTempY listY.add(intTempX) listY.add listY intTempX {
				listX.add(intTempX);
				listY.add(intTempY);
			} listX.add(intTempX) listX.add listX intTempX listY.add(intTempY) listY.add listY intTempY if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.println(listY.get(i) + " " + listX.get(i));
			}
		} listX.size() != 0 listX.size() listX.size listX 0 {
			for(int i = 0; i < listX.size(); i++){
				System.out.println(listY.get(i) + " " + listX.get(i));
			}
		} for(int i = 0; i < listX.size(); i++){
				System.out.println(listY.get(i) + " " + listX.get(i));
			} int i = 0; int i = 0; i 0 i < listX.size() i listX.size() listX.size listX i++ i++ i {
				System.out.println(listY.get(i) + " " + listX.get(i));
			} {
				System.out.println(listY.get(i) + " " + listX.get(i));
			} System.out.println(listY.get(i) + " " + listX.get(i)) System.out.println System.out System System.out listY.get(i) + " " + listX.get(i) listY.get(i) + " " + listX.get(i) listY.get(i) listY.get listY i " " listX.get(i) listX.get listX i String[] args args public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		ArrayList<Integer> listX = new ArrayList<Integer>();
		ArrayList<Integer> listY = new ArrayList<Integer>();
		int intTempX;
		int intTempY;

		while(scan.hasNext()){
			intTempX = scan.nextInt();
			intTempY = scan.nextInt();
			if(intTempX == 0 && intTempY == 0){
				scan.close();
				break;
			}else if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			}
		}
		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.println(listY.get(i) + " " + listX.get(i));
			}
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		ArrayList<Integer> listX = new ArrayList<Integer>();
		ArrayList<Integer> listY = new ArrayList<Integer>();
		int intTempX;
		int intTempY;

		while(scan.hasNext()){
			intTempX = scan.nextInt();
			intTempY = scan.nextInt();
			if(intTempX == 0 && intTempY == 0){
				scan.close();
				break;
			}else if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			}
		}
		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.println(listY.get(i) + " " + listX.get(i));
			}
		}
	}
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		ArrayList<Integer> listX = new ArrayList<Integer>();
		ArrayList<Integer> listY = new ArrayList<Integer>();
		int intTempX;
		int intTempY;

		while(scan.hasNext()){
			intTempX = scan.nextInt();
			intTempY = scan.nextInt();
			if(intTempX == 0 && intTempY == 0){
				scan.close();
				break;
			}else if(intTempX < intTempY){
				listX.add(intTempY);
				listY.add(intTempX);
			}else{
				listX.add(intTempX);
				listY.add(intTempY);
			}
		}
		if(listX.size() != 0){
			for(int i = 0; i < listX.size(); i++){
				System.out.println(listY.get(i) + " " + listX.get(i));
			}
		}
	}
}