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


public class Main {
	public static void main(String[] args) {
		ArrayList<Integer[]> num = new ArrayList<Integer[]>();
		int x;
		int y;
		Scanner sc = new Scanner(System.in);

		//??\??????????????????0 0?????§??°?????????
		while (sc.hasNext()) {
			x=sc.nextInt();
			y=sc.nextInt();
			Integer[] sort = new Integer[2];
			sort[0]=x;
			sort[1]=y;

			//0??\??????????????????
			if(x==0 && y==0){
				break;
			}
			//??\???????????´??°??????????????????
			Arrays.sort(sort);
			num.add(sort);
		}
		//??\???????????´??°?????¨???
		for (int i = 0; i < num.size(); i++) {
			System.out.println(num.get(i)[0]+" "+num.get(i)[1]);
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		ArrayList<Integer[]> num = new ArrayList<Integer[]>();
		int x;
		int y;
		Scanner sc = new Scanner(System.in);

		//??\??????????????????0 0?????§??°?????????
		while (sc.hasNext()) {
			x=sc.nextInt();
			y=sc.nextInt();
			Integer[] sort = new Integer[2];
			sort[0]=x;
			sort[1]=y;

			//0??\??????????????????
			if(x==0 && y==0){
				break;
			}
			//??\???????????´??°??????????????????
			Arrays.sort(sort);
			num.add(sort);
		}
		//??\???????????´??°?????¨???
		for (int i = 0; i < num.size(); i++) {
			System.out.println(num.get(i)[0]+" "+num.get(i)[1]);
		}
	}
} Main public static void main(String[] args) {
		ArrayList<Integer[]> num = new ArrayList<Integer[]>();
		int x;
		int y;
		Scanner sc = new Scanner(System.in);

		//??\??????????????????0 0?????§??°?????????
		while (sc.hasNext()) {
			x=sc.nextInt();
			y=sc.nextInt();
			Integer[] sort = new Integer[2];
			sort[0]=x;
			sort[1]=y;

			//0??\??????????????????
			if(x==0 && y==0){
				break;
			}
			//??\???????????´??°??????????????????
			Arrays.sort(sort);
			num.add(sort);
		}
		//??\???????????´??°?????¨???
		for (int i = 0; i < num.size(); i++) {
			System.out.println(num.get(i)[0]+" "+num.get(i)[1]);
		}
	} main {
		ArrayList<Integer[]> num = new ArrayList<Integer[]>();
		int x;
		int y;
		Scanner sc = new Scanner(System.in);

		//??\??????????????????0 0?????§??°?????????
		while (sc.hasNext()) {
			x=sc.nextInt();
			y=sc.nextInt();
			Integer[] sort = new Integer[2];
			sort[0]=x;
			sort[1]=y;

			//0??\??????????????????
			if(x==0 && y==0){
				break;
			}
			//??\???????????´??°??????????????????
			Arrays.sort(sort);
			num.add(sort);
		}
		//??\???????????´??°?????¨???
		for (int i = 0; i < num.size(); i++) {
			System.out.println(num.get(i)[0]+" "+num.get(i)[1]);
		}
	} ArrayList<Integer[]> num = new ArrayList<Integer[]>(); num new ArrayList<Integer[]>() int x; x int y; y Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
			x=sc.nextInt();
			y=sc.nextInt();
			Integer[] sort = new Integer[2];
			sort[0]=x;
			sort[1]=y;

			//0??\??????????????????
			if(x==0 && y==0){
				break;
			}
			//??\???????????´??°??????????????????
			Arrays.sort(sort);
			num.add(sort);
		} sc.hasNext() sc.hasNext sc {
			x=sc.nextInt();
			y=sc.nextInt();
			Integer[] sort = new Integer[2];
			sort[0]=x;
			sort[1]=y;

			//0??\??????????????????
			if(x==0 && y==0){
				break;
			}
			//??\???????????´??°??????????????????
			Arrays.sort(sort);
			num.add(sort);
		} x=sc.nextInt() x sc.nextInt() sc.nextInt sc y=sc.nextInt() y sc.nextInt() sc.nextInt sc Integer[] sort = new Integer[2]; sort new Integer[2] 2 sort[0]=x sort[0] sort 0 x sort[1]=y sort[1] sort 1 y if(x==0 && y==0){
				break;
			} x==0 && y==0 x==0 x 0 y==0 y 0 {
				break;
			} break; Arrays.sort(sort) Arrays.sort Arrays sort num.add(sort) num.add num sort for (int i = 0; i < num.size(); i++) {
			System.out.println(num.get(i)[0]+" "+num.get(i)[1]);
		} int i = 0; int i = 0; i 0 i < num.size() i num.size() num.size num i++ i++ i {
			System.out.println(num.get(i)[0]+" "+num.get(i)[1]);
		} {
			System.out.println(num.get(i)[0]+" "+num.get(i)[1]);
		} System.out.println(num.get(i)[0]+" "+num.get(i)[1]) System.out.println System.out System System.out num.get(i)[0]+" "+num.get(i)[1] num.get(i)[0]+" "+num.get(i)[1] num.get(i)[0] num.get(i) num.get num i 0 " " num.get(i)[1] num.get(i) num.get num i 1 String[] args args public class Main {
	public static void main(String[] args) {
		ArrayList<Integer[]> num = new ArrayList<Integer[]>();
		int x;
		int y;
		Scanner sc = new Scanner(System.in);

		//??\??????????????????0 0?????§??°?????????
		while (sc.hasNext()) {
			x=sc.nextInt();
			y=sc.nextInt();
			Integer[] sort = new Integer[2];
			sort[0]=x;
			sort[1]=y;

			//0??\??????????????????
			if(x==0 && y==0){
				break;
			}
			//??\???????????´??°??????????????????
			Arrays.sort(sort);
			num.add(sort);
		}
		//??\???????????´??°?????¨???
		for (int i = 0; i < num.size(); i++) {
			System.out.println(num.get(i)[0]+" "+num.get(i)[1]);
		}
	}
} public class Main {
	public static void main(String[] args) {
		ArrayList<Integer[]> num = new ArrayList<Integer[]>();
		int x;
		int y;
		Scanner sc = new Scanner(System.in);

		//??\??????????????????0 0?????§??°?????????
		while (sc.hasNext()) {
			x=sc.nextInt();
			y=sc.nextInt();
			Integer[] sort = new Integer[2];
			sort[0]=x;
			sort[1]=y;

			//0??\??????????????????
			if(x==0 && y==0){
				break;
			}
			//??\???????????´??°??????????????????
			Arrays.sort(sort);
			num.add(sort);
		}
		//??\???????????´??°?????¨???
		for (int i = 0; i < num.size(); i++) {
			System.out.println(num.get(i)[0]+" "+num.get(i)[1]);
		}
	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		ArrayList<Integer[]> num = new ArrayList<Integer[]>();
		int x;
		int y;
		Scanner sc = new Scanner(System.in);

		//??\??????????????????0 0?????§??°?????????
		while (sc.hasNext()) {
			x=sc.nextInt();
			y=sc.nextInt();
			Integer[] sort = new Integer[2];
			sort[0]=x;
			sort[1]=y;

			//0??\??????????????????
			if(x==0 && y==0){
				break;
			}
			//??\???????????´??°??????????????????
			Arrays.sort(sort);
			num.add(sort);
		}
		//??\???????????´??°?????¨???
		for (int i = 0; i < num.size(); i++) {
			System.out.println(num.get(i)[0]+" "+num.get(i)[1]);
		}
	}
}