import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int[] x = new int[3000];
		int[] y = new int[3000];
		int tmp;
		for(int i=0;i<3000;i++){
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			if(x[i] == 0 && y[i] == 0) break;
			if(x[i] > y[i]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			}
			System.out.println(x[i]+" "+y[i]);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int[] x = new int[3000];
		int[] y = new int[3000];
		int tmp;
		for(int i=0;i<3000;i++){
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			if(x[i] == 0 && y[i] == 0) break;
			if(x[i] > y[i]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			}
			System.out.println(x[i]+" "+y[i]);
		}
	}
} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int[] x = new int[3000];
		int[] y = new int[3000];
		int tmp;
		for(int i=0;i<3000;i++){
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			if(x[i] == 0 && y[i] == 0) break;
			if(x[i] > y[i]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			}
			System.out.println(x[i]+" "+y[i]);
		}
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int[] x = new int[3000];
		int[] y = new int[3000];
		int tmp;
		for(int i=0;i<3000;i++){
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			if(x[i] == 0 && y[i] == 0) break;
			if(x[i] > y[i]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			}
			System.out.println(x[i]+" "+y[i]);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] x = new int[3000]; x new int[3000] 3000 int[] y = new int[3000]; y new int[3000] 3000 int tmp; tmp for(int i=0;i<3000;i++){
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			if(x[i] == 0 && y[i] == 0) break;
			if(x[i] > y[i]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			}
			System.out.println(x[i]+" "+y[i]);
		} int i=0; int i=0; i 0 i<3000 i 3000 i++ i++ i {
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			if(x[i] == 0 && y[i] == 0) break;
			if(x[i] > y[i]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			}
			System.out.println(x[i]+" "+y[i]);
		} {
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			if(x[i] == 0 && y[i] == 0) break;
			if(x[i] > y[i]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			}
			System.out.println(x[i]+" "+y[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; 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]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			} x[i] > y[i] x[i] x i y[i] y i {
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			} tmp=x[i] tmp x[i] x i x[i]=y[i] x[i] x i y[i] y i y[i]=tmp y[i] y i tmp System.out.println(x[i]+" "+y[i]) System.out.println System.out System System.out x[i]+" "+y[i] x[i]+" "+y[i] x[i] x i " " y[i] y i String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int[] x = new int[3000];
		int[] y = new int[3000];
		int tmp;
		for(int i=0;i<3000;i++){
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			if(x[i] == 0 && y[i] == 0) break;
			if(x[i] > y[i]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			}
			System.out.println(x[i]+" "+y[i]);
		}
	}
} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int[] x = new int[3000];
		int[] y = new int[3000];
		int tmp;
		for(int i=0;i<3000;i++){
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			if(x[i] == 0 && y[i] == 0) break;
			if(x[i] > y[i]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			}
			System.out.println(x[i]+" "+y[i]);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int[] x = new int[3000];
		int[] y = new int[3000];
		int tmp;
		for(int i=0;i<3000;i++){
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			if(x[i] == 0 && y[i] == 0) break;
			if(x[i] > y[i]){
				tmp=x[i];
				x[i]=y[i];
				y[i]=tmp;
			}
			System.out.println(x[i]+" "+y[i]);
		}
	}
}