import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		int i=0;
		int x[]=new int[10000];
		int y[]=new int[10000];
		while(true){
			x[i]=sc.nextInt();
			y[i]=sc.nextInt();

			if(x[i]==0&&y[i]==0)	break;
			else if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			}

			i++;
		}

		for(int j=0;j<i;j++)	System.out.println(x[j]+" "+y[j]);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		int i=0;
		int x[]=new int[10000];
		int y[]=new int[10000];
		while(true){
			x[i]=sc.nextInt();
			y[i]=sc.nextInt();

			if(x[i]==0&&y[i]==0)	break;
			else if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			}

			i++;
		}

		for(int j=0;j<i;j++)	System.out.println(x[j]+" "+y[j]);
	}
} Main public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		int i=0;
		int x[]=new int[10000];
		int y[]=new int[10000];
		while(true){
			x[i]=sc.nextInt();
			y[i]=sc.nextInt();

			if(x[i]==0&&y[i]==0)	break;
			else if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			}

			i++;
		}

		for(int j=0;j<i;j++)	System.out.println(x[j]+" "+y[j]);
	} main {
		Scanner sc=new Scanner(System.in);

		int i=0;
		int x[]=new int[10000];
		int y[]=new int[10000];
		while(true){
			x[i]=sc.nextInt();
			y[i]=sc.nextInt();

			if(x[i]==0&&y[i]==0)	break;
			else if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			}

			i++;
		}

		for(int j=0;j<i;j++)	System.out.println(x[j]+" "+y[j]);
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int i=0; i 0 int x[]=new int[10000]; x new int[10000] 10000 int y[]=new int[10000]; y new int[10000] 10000 while(true){
			x[i]=sc.nextInt();
			y[i]=sc.nextInt();

			if(x[i]==0&&y[i]==0)	break;
			else if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			}

			i++;
		} true {
			x[i]=sc.nextInt();
			y[i]=sc.nextInt();

			if(x[i]==0&&y[i]==0)	break;
			else if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			}

			i++;
		} x[i]=sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc y[i]=sc.nextInt() y[i] y i sc.nextInt() sc.nextInt sc if(x[i]==0&&y[i]==0)	break;
			else if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			} x[i]==0&&y[i]==0 x[i]==0 x[i] x i 0 y[i]==0 y[i] y i 0 break; if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			} x[i]>y[i] x[i] x i y[i] y i {
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			} int val=x[i]; val x[i] x i x[i]=y[i] x[i] x i y[i] y i y[i]=val y[i] y i val i++ i for(int j=0;j<i;j++)	System.out.println(x[j]+" "+y[j]); int j=0; int j=0; j 0 j<i j i j++ j++ j System.out.println(x[j]+" "+y[j]); System.out.println(x[j]+" "+y[j]) System.out.println System.out System System.out x[j]+" "+y[j] x[j]+" "+y[j] x[j] x j " " y[j] y j String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		int i=0;
		int x[]=new int[10000];
		int y[]=new int[10000];
		while(true){
			x[i]=sc.nextInt();
			y[i]=sc.nextInt();

			if(x[i]==0&&y[i]==0)	break;
			else if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			}

			i++;
		}

		for(int j=0;j<i;j++)	System.out.println(x[j]+" "+y[j]);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		int i=0;
		int x[]=new int[10000];
		int y[]=new int[10000];
		while(true){
			x[i]=sc.nextInt();
			y[i]=sc.nextInt();

			if(x[i]==0&&y[i]==0)	break;
			else if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			}

			i++;
		}

		for(int j=0;j<i;j++)	System.out.println(x[j]+" "+y[j]);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		int i=0;
		int x[]=new int[10000];
		int y[]=new int[10000];
		while(true){
			x[i]=sc.nextInt();
			y[i]=sc.nextInt();

			if(x[i]==0&&y[i]==0)	break;
			else if(x[i]>y[i]){
				int val=x[i];
				x[i]=y[i];
				y[i]=val;
			}

			i++;
		}

		for(int j=0;j<i;j++)	System.out.println(x[j]+" "+y[j]);
	}
}