import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
		int x[]=new int[6000],y[]=new int[6000];
		x[0]=kb.nextInt();
		y[0]=kb.nextInt();
		int h=0;
		int i=0;
		while(x[h]!=0||y[h]!=0){
			h++;
			x[h]=kb.nextInt();
			y[h]=kb.nextInt();

		}

		while(x[i]!=0||y[i]!=0){
			if(x[i]>=y[i]){
				System.out.printf("%d %d",y[i],x[i]);
			}else if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			}
			System.out.println();
			i++;
		}
	}

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

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
		int x[]=new int[6000],y[]=new int[6000];
		x[0]=kb.nextInt();
		y[0]=kb.nextInt();
		int h=0;
		int i=0;
		while(x[h]!=0||y[h]!=0){
			h++;
			x[h]=kb.nextInt();
			y[h]=kb.nextInt();

		}

		while(x[i]!=0||y[i]!=0){
			if(x[i]>=y[i]){
				System.out.printf("%d %d",y[i],x[i]);
			}else if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			}
			System.out.println();
			i++;
		}
	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
		int x[]=new int[6000],y[]=new int[6000];
		x[0]=kb.nextInt();
		y[0]=kb.nextInt();
		int h=0;
		int i=0;
		while(x[h]!=0||y[h]!=0){
			h++;
			x[h]=kb.nextInt();
			y[h]=kb.nextInt();

		}

		while(x[i]!=0||y[i]!=0){
			if(x[i]>=y[i]){
				System.out.printf("%d %d",y[i],x[i]);
			}else if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			}
			System.out.println();
			i++;
		}
	} main {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
		int x[]=new int[6000],y[]=new int[6000];
		x[0]=kb.nextInt();
		y[0]=kb.nextInt();
		int h=0;
		int i=0;
		while(x[h]!=0||y[h]!=0){
			h++;
			x[h]=kb.nextInt();
			y[h]=kb.nextInt();

		}

		while(x[i]!=0||y[i]!=0){
			if(x[i]>=y[i]){
				System.out.printf("%d %d",y[i],x[i]);
			}else if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			}
			System.out.println();
			i++;
		}
	} Scanner kb=new Scanner(System.in); kb new Scanner(System.in) int x[]=new int[6000] x new int[6000] 6000 y[]=new int[6000]; y new int[6000] 6000 x[0]=kb.nextInt() x[0] x 0 kb.nextInt() kb.nextInt kb y[0]=kb.nextInt() y[0] y 0 kb.nextInt() kb.nextInt kb int h=0; h 0 int i=0; i 0 while(x[h]!=0||y[h]!=0){
			h++;
			x[h]=kb.nextInt();
			y[h]=kb.nextInt();

		} x[h]!=0||y[h]!=0 x[h]!=0 x[h] x h 0 y[h]!=0 y[h] y h 0 {
			h++;
			x[h]=kb.nextInt();
			y[h]=kb.nextInt();

		} h++ h x[h]=kb.nextInt() x[h] x h kb.nextInt() kb.nextInt kb y[h]=kb.nextInt() y[h] y h kb.nextInt() kb.nextInt kb while(x[i]!=0||y[i]!=0){
			if(x[i]>=y[i]){
				System.out.printf("%d %d",y[i],x[i]);
			}else if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			}
			System.out.println();
			i++;
		} x[i]!=0||y[i]!=0 x[i]!=0 x[i] x i 0 y[i]!=0 y[i] y i 0 {
			if(x[i]>=y[i]){
				System.out.printf("%d %d",y[i],x[i]);
			}else if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			}
			System.out.println();
			i++;
		} if(x[i]>=y[i]){
				System.out.printf("%d %d",y[i],x[i]);
			}else if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			} x[i]>=y[i] x[i] x i y[i] y i {
				System.out.printf("%d %d",y[i],x[i]);
			} System.out.printf("%d %d",y[i],x[i]) System.out.printf System.out System System.out "%d %d" y[i] y i x[i] x i if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			} x[i]<y[i] x[i] x i y[i] y i {
				System.out.printf("%d %d",x[i],y[i]);
			} System.out.printf("%d %d",x[i],y[i]) System.out.printf System.out System System.out "%d %d" x[i] x i y[i] y i System.out.println() System.out.println System.out System System.out i++ i String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
		int x[]=new int[6000],y[]=new int[6000];
		x[0]=kb.nextInt();
		y[0]=kb.nextInt();
		int h=0;
		int i=0;
		while(x[h]!=0||y[h]!=0){
			h++;
			x[h]=kb.nextInt();
			y[h]=kb.nextInt();

		}

		while(x[i]!=0||y[i]!=0){
			if(x[i]>=y[i]){
				System.out.printf("%d %d",y[i],x[i]);
			}else if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			}
			System.out.println();
			i++;
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
		int x[]=new int[6000],y[]=new int[6000];
		x[0]=kb.nextInt();
		y[0]=kb.nextInt();
		int h=0;
		int i=0;
		while(x[h]!=0||y[h]!=0){
			h++;
			x[h]=kb.nextInt();
			y[h]=kb.nextInt();

		}

		while(x[i]!=0||y[i]!=0){
			if(x[i]>=y[i]){
				System.out.printf("%d %d",y[i],x[i]);
			}else if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			}
			System.out.println();
			i++;
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
		int x[]=new int[6000],y[]=new int[6000];
		x[0]=kb.nextInt();
		y[0]=kb.nextInt();
		int h=0;
		int i=0;
		while(x[h]!=0||y[h]!=0){
			h++;
			x[h]=kb.nextInt();
			y[h]=kb.nextInt();

		}

		while(x[i]!=0||y[i]!=0){
			if(x[i]>=y[i]){
				System.out.printf("%d %d",y[i],x[i]);
			}else if(x[i]<y[i]){
				System.out.printf("%d %d",x[i],y[i]);
			}
			System.out.println();
			i++;
		}
	}

}