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

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//System.out.println("??\???>>");

		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();



		while(scan.hasNext()){

			Integer ary[];
			ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();

			if(ary[0] == 0 && ary[1] == 0 ){

				scan.close();
				break;
			}else{

				list.add(ary);
			}
		}

		for(int i = 0; i < list.size(); i++){

			Integer[] ary = list.get(i);

			if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			}

			//System.out.println("ary[0]:" + ary[0] + "ary[1]:" + ary[1]);
		}

	}

} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//System.out.println("??\???>>");

		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();



		while(scan.hasNext()){

			Integer ary[];
			ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();

			if(ary[0] == 0 && ary[1] == 0 ){

				scan.close();
				break;
			}else{

				list.add(ary);
			}
		}

		for(int i = 0; i < list.size(); i++){

			Integer[] ary = list.get(i);

			if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			}

			//System.out.println("ary[0]:" + ary[0] + "ary[1]:" + ary[1]);
		}

	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//System.out.println("??\???>>");

		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();



		while(scan.hasNext()){

			Integer ary[];
			ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();

			if(ary[0] == 0 && ary[1] == 0 ){

				scan.close();
				break;
			}else{

				list.add(ary);
			}
		}

		for(int i = 0; i < list.size(); i++){

			Integer[] ary = list.get(i);

			if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			}

			//System.out.println("ary[0]:" + ary[0] + "ary[1]:" + ary[1]);
		}

	} main {
		// TODO ?????????????????????????????????????????????

		//System.out.println("??\???>>");

		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();



		while(scan.hasNext()){

			Integer ary[];
			ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();

			if(ary[0] == 0 && ary[1] == 0 ){

				scan.close();
				break;
			}else{

				list.add(ary);
			}
		}

		for(int i = 0; i < list.size(); i++){

			Integer[] ary = list.get(i);

			if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			}

			//System.out.println("ary[0]:" + ary[0] + "ary[1]:" + ary[1]);
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) ArrayList<Integer[]> list = new ArrayList<Integer[]>(); list new ArrayList<Integer[]>() while(scan.hasNext()){

			Integer ary[];
			ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();

			if(ary[0] == 0 && ary[1] == 0 ){

				scan.close();
				break;
			}else{

				list.add(ary);
			}
		} scan.hasNext() scan.hasNext scan {

			Integer ary[];
			ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();

			if(ary[0] == 0 && ary[1] == 0 ){

				scan.close();
				break;
			}else{

				list.add(ary);
			}
		} Integer ary[]; ary ary = new Integer[2] ary new Integer[2] 2 ary[0] = scan.nextInt() ary[0] ary 0 scan.nextInt() scan.nextInt scan ary[1] = scan.nextInt() ary[1] ary 1 scan.nextInt() scan.nextInt scan if(ary[0] == 0 && ary[1] == 0 ){

				scan.close();
				break;
			}else{

				list.add(ary);
			} ary[0] == 0 && ary[1] == 0 ary[0] == 0 ary[0] ary 0 0 ary[1] == 0 ary[1] ary 1 0 {

				scan.close();
				break;
			} scan.close() scan.close scan break; {

				list.add(ary);
			} list.add(ary) list.add list ary for(int i = 0; i < list.size(); i++){

			Integer[] ary = list.get(i);

			if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			}

			//System.out.println("ary[0]:" + ary[0] + "ary[1]:" + ary[1]);
		} int i = 0; int i = 0; i 0 i < list.size() i list.size() list.size list i++ i++ i {

			Integer[] ary = list.get(i);

			if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			}

			//System.out.println("ary[0]:" + ary[0] + "ary[1]:" + ary[1]);
		} {

			Integer[] ary = list.get(i);

			if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			}

			//System.out.println("ary[0]:" + ary[0] + "ary[1]:" + ary[1]);
		} Integer[] ary = list.get(i); ary list.get(i) list.get list i if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			} ary[0] < ary[1] ary[0] ary 0 ary[1] ary 1 {

				System.out.println( ary[0] + " " + ary[1]);
			} System.out.println( ary[0] + " " + ary[1]) System.out.println System.out System System.out ary[0] + " " + ary[1] ary[0] + " " + ary[1] ary[0] ary 0 " " ary[1] ary 1 {

				System.out.println( ary[1] + " " + ary[0]);
			} System.out.println( ary[1] + " " + ary[0]) System.out.println System.out System System.out ary[1] + " " + ary[0] ary[1] + " " + ary[0] ary[1] ary 1 " " ary[0] ary 0 String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//System.out.println("??\???>>");

		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();



		while(scan.hasNext()){

			Integer ary[];
			ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();

			if(ary[0] == 0 && ary[1] == 0 ){

				scan.close();
				break;
			}else{

				list.add(ary);
			}
		}

		for(int i = 0; i < list.size(); i++){

			Integer[] ary = list.get(i);

			if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			}

			//System.out.println("ary[0]:" + ary[0] + "ary[1]:" + ary[1]);
		}

	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//System.out.println("??\???>>");

		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();



		while(scan.hasNext()){

			Integer ary[];
			ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();

			if(ary[0] == 0 && ary[1] == 0 ){

				scan.close();
				break;
			}else{

				list.add(ary);
			}
		}

		for(int i = 0; i < list.size(); i++){

			Integer[] ary = list.get(i);

			if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			}

			//System.out.println("ary[0]:" + ary[0] + "ary[1]:" + ary[1]);
		}

	}

} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//System.out.println("??\???>>");

		Scanner scan = new Scanner(System.in);
		ArrayList<Integer[]> list = new ArrayList<Integer[]>();



		while(scan.hasNext()){

			Integer ary[];
			ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();

			if(ary[0] == 0 && ary[1] == 0 ){

				scan.close();
				break;
			}else{

				list.add(ary);
			}
		}

		for(int i = 0; i < list.size(); i++){

			Integer[] ary = list.get(i);

			if(ary[0] < ary[1]){

				System.out.println( ary[0] + " " + ary[1]);
			}else{

				System.out.println( ary[1] + " " + ary[0]);
			}

			//System.out.println("ary[0]:" + ary[0] + "ary[1]:" + ary[1]);
		}

	}

}