import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(int i=1;;i++){
			a = sc.nextInt();
			b = sc.nextInt();
			if(a==0&&b==0)break;
			if(a<b)
				System.out.println(a+" "+b);
			else
				System.out.println(b+" "+a);
		}
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(int i=1;;i++){
			a = sc.nextInt();
			b = sc.nextInt();
			if(a==0&&b==0)break;
			if(a<b)
				System.out.println(a+" "+b);
			else
				System.out.println(b+" "+a);
		}
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(int i=1;;i++){
			a = sc.nextInt();
			b = sc.nextInt();
			if(a==0&&b==0)break;
			if(a<b)
				System.out.println(a+" "+b);
			else
				System.out.println(b+" "+a);
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(int i=1;;i++){
			a = sc.nextInt();
			b = sc.nextInt();
			if(a==0&&b==0)break;
			if(a<b)
				System.out.println(a+" "+b);
			else
				System.out.println(b+" "+a);
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		for(int i=1;;i++){
			a = sc.nextInt();
			b = sc.nextInt();
			if(a==0&&b==0)break;
			if(a<b)
				System.out.println(a+" "+b);
			else
				System.out.println(b+" "+a);
		}
	}

}