import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] a = new int[3000];
		int[] b = new int[3000];

		for(int i = 0 ; i<3000 ; i++){
			a[i]=scan.nextInt();
			b[i]=scan.nextInt();
			if(a[i]==0&& b[i]==0) break;
		}

		for(int i = 0 ; i<3000 ; i++){
			if(a[i]==0&& b[i]==0) break;
			if(a[i]>b[i])swap(a,b,i);
			System.out.println(a[i]+" "+b[i]);
		}
	}

	static void swap(int[] a,int[] b,int i){
		int tmp =a[i];
		a[i]=b[i];
		b[i]=tmp;
		return;
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] a = new int[3000];
		int[] b = new int[3000];

		for(int i = 0 ; i<3000 ; i++){
			a[i]=scan.nextInt();
			b[i]=scan.nextInt();
			if(a[i]==0&& b[i]==0) break;
		}

		for(int i = 0 ; i<3000 ; i++){
			if(a[i]==0&& b[i]==0) break;
			if(a[i]>b[i])swap(a,b,i);
			System.out.println(a[i]+" "+b[i]);
		}
	}

	static void swap(int[] a,int[] b,int i){
		int tmp =a[i];
		a[i]=b[i];
		b[i]=tmp;
		return;
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] a = new int[3000];
		int[] b = new int[3000];

		for(int i = 0 ; i<3000 ; i++){
			a[i]=scan.nextInt();
			b[i]=scan.nextInt();
			if(a[i]==0&& b[i]==0) break;
		}

		for(int i = 0 ; i<3000 ; i++){
			if(a[i]==0&& b[i]==0) break;
			if(a[i]>b[i])swap(a,b,i);
			System.out.println(a[i]+" "+b[i]);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int[] a = new int[3000];
		int[] b = new int[3000];

		for(int i = 0 ; i<3000 ; i++){
			a[i]=scan.nextInt();
			b[i]=scan.nextInt();
			if(a[i]==0&& b[i]==0) break;
		}

		for(int i = 0 ; i<3000 ; i++){
			if(a[i]==0&& b[i]==0) break;
			if(a[i]>b[i])swap(a,b,i);
			System.out.println(a[i]+" "+b[i]);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[] a = new int[3000]; a new int[3000] 3000 int[] b = new int[3000]; b new int[3000] 3000 for(int i = 0 ; i<3000 ; i++){
			a[i]=scan.nextInt();
			b[i]=scan.nextInt();
			if(a[i]==0&& b[i]==0) break;
		} int i = 0 ; int i = 0 ; i 0 i<3000 i 3000 i++ i++ i {
			a[i]=scan.nextInt();
			b[i]=scan.nextInt();
			if(a[i]==0&& b[i]==0) break;
		} {
			a[i]=scan.nextInt();
			b[i]=scan.nextInt();
			if(a[i]==0&& b[i]==0) break;
		} a[i]=scan.nextInt() a[i] a i scan.nextInt() scan.nextInt scan b[i]=scan.nextInt() b[i] b i scan.nextInt() scan.nextInt scan if(a[i]==0&& b[i]==0) break; a[i]==0&& b[i]==0 a[i]==0 a[i] a i 0 b[i]==0 b[i] b i 0 break; for(int i = 0 ; i<3000 ; i++){
			if(a[i]==0&& b[i]==0) break;
			if(a[i]>b[i])swap(a,b,i);
			System.out.println(a[i]+" "+b[i]);
		} int i = 0 ; int i = 0 ; i 0 i<3000 i 3000 i++ i++ i {
			if(a[i]==0&& b[i]==0) break;
			if(a[i]>b[i])swap(a,b,i);
			System.out.println(a[i]+" "+b[i]);
		} {
			if(a[i]==0&& b[i]==0) break;
			if(a[i]>b[i])swap(a,b,i);
			System.out.println(a[i]+" "+b[i]);
		} if(a[i]==0&& b[i]==0) break; a[i]==0&& b[i]==0 a[i]==0 a[i] a i 0 b[i]==0 b[i] b i 0 break; if(a[i]>b[i])swap(a,b,i); a[i]>b[i] a[i] a i b[i] b i swap(a,b,i) swap a b i System.out.println(a[i]+" "+b[i]) System.out.println System.out System System.out a[i]+" "+b[i] a[i]+" "+b[i] a[i] a i " " b[i] b i String[] args args static void swap(int[] a,int[] b,int i){
		int tmp =a[i];
		a[i]=b[i];
		b[i]=tmp;
		return;
	} swap {
		int tmp =a[i];
		a[i]=b[i];
		b[i]=tmp;
		return;
	} int tmp =a[i]; tmp a[i] a i a[i]=b[i] a[i] a i b[i] b i b[i]=tmp b[i] b i tmp return; int[] a a int[] b b int i i public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] a = new int[3000];
		int[] b = new int[3000];

		for(int i = 0 ; i<3000 ; i++){
			a[i]=scan.nextInt();
			b[i]=scan.nextInt();
			if(a[i]==0&& b[i]==0) break;
		}

		for(int i = 0 ; i<3000 ; i++){
			if(a[i]==0&& b[i]==0) break;
			if(a[i]>b[i])swap(a,b,i);
			System.out.println(a[i]+" "+b[i]);
		}
	}

	static void swap(int[] a,int[] b,int i){
		int tmp =a[i];
		a[i]=b[i];
		b[i]=tmp;
		return;
	}

} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] a = new int[3000];
		int[] b = new int[3000];

		for(int i = 0 ; i<3000 ; i++){
			a[i]=scan.nextInt();
			b[i]=scan.nextInt();
			if(a[i]==0&& b[i]==0) break;
		}

		for(int i = 0 ; i<3000 ; i++){
			if(a[i]==0&& b[i]==0) break;
			if(a[i]>b[i])swap(a,b,i);
			System.out.println(a[i]+" "+b[i]);
		}
	}

	static void swap(int[] a,int[] b,int i){
		int tmp =a[i];
		a[i]=b[i];
		b[i]=tmp;
		return;
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] a = new int[3000];
		int[] b = new int[3000];

		for(int i = 0 ; i<3000 ; i++){
			a[i]=scan.nextInt();
			b[i]=scan.nextInt();
			if(a[i]==0&& b[i]==0) break;
		}

		for(int i = 0 ; i<3000 ; i++){
			if(a[i]==0&& b[i]==0) break;
			if(a[i]>b[i])swap(a,b,i);
			System.out.println(a[i]+" "+b[i]);
		}
	}

	static void swap(int[] a,int[] b,int i){
		int tmp =a[i];
		a[i]=b[i];
		b[i]=tmp;
		return;
	}

}