import java.util.*;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		
		int a ,b;
		int count = 0;
		while(true){
			a = scanner.nextInt();
			b = scanner.nextInt();
			if(a == 0 && b == 0){break;}
			if(a > b){
				System.out.println(b + " " + a);
			}
			else{
				System.out.println(a + " " + b);
			}
				
		}
		scanner.close();
		
		
	}

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

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		
		int a ,b;
		int count = 0;
		while(true){
			a = scanner.nextInt();
			b = scanner.nextInt();
			if(a == 0 && b == 0){break;}
			if(a > b){
				System.out.println(b + " " + a);
			}
			else{
				System.out.println(a + " " + b);
			}
				
		}
		scanner.close();
		
		
	}

} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		
		int a ,b;
		int count = 0;
		while(true){
			a = scanner.nextInt();
			b = scanner.nextInt();
			if(a == 0 && b == 0){break;}
			if(a > b){
				System.out.println(b + " " + a);
			}
			else{
				System.out.println(a + " " + b);
			}
				
		}
		scanner.close();
		
		
	} main {

		Scanner scanner = new Scanner(System.in);
		
		int a ,b;
		int count = 0;
		while(true){
			a = scanner.nextInt();
			b = scanner.nextInt();
			if(a == 0 && b == 0){break;}
			if(a > b){
				System.out.println(b + " " + a);
			}
			else{
				System.out.println(a + " " + b);
			}
				
		}
		scanner.close();
		
		
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a a b; b int count = 0; count 0 while(true){
			a = scanner.nextInt();
			b = scanner.nextInt();
			if(a == 0 && b == 0){break;}
			if(a > b){
				System.out.println(b + " " + a);
			}
			else{
				System.out.println(a + " " + b);
			}
				
		} true {
			a = scanner.nextInt();
			b = scanner.nextInt();
			if(a == 0 && b == 0){break;}
			if(a > b){
				System.out.println(b + " " + a);
			}
			else{
				System.out.println(a + " " + b);
			}
				
		} a = scanner.nextInt() a scanner.nextInt() scanner.nextInt scanner b = scanner.nextInt() b scanner.nextInt() scanner.nextInt scanner if(a == 0 && b == 0){break;} a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {break;} break; if(a > b){
				System.out.println(b + " " + a);
			}
			else{
				System.out.println(a + " " + b);
			} a > b a b {
				System.out.println(b + " " + a);
			} System.out.println(b + " " + a) System.out.println System.out System System.out b + " " + a b + " " + a b " " a {
				System.out.println(a + " " + b);
			} System.out.println(a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b scanner.close() scanner.close scanner String[] args args public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		
		int a ,b;
		int count = 0;
		while(true){
			a = scanner.nextInt();
			b = scanner.nextInt();
			if(a == 0 && b == 0){break;}
			if(a > b){
				System.out.println(b + " " + a);
			}
			else{
				System.out.println(a + " " + b);
			}
				
		}
		scanner.close();
		
		
	}

} public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		
		int a ,b;
		int count = 0;
		while(true){
			a = scanner.nextInt();
			b = scanner.nextInt();
			if(a == 0 && b == 0){break;}
			if(a > b){
				System.out.println(b + " " + a);
			}
			else{
				System.out.println(a + " " + b);
			}
				
		}
		scanner.close();
		
		
	}

} Main
import java.util.*;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		
		int a ,b;
		int count = 0;
		while(true){
			a = scanner.nextInt();
			b = scanner.nextInt();
			if(a == 0 && b == 0){break;}
			if(a > b){
				System.out.println(b + " " + a);
			}
			else{
				System.out.println(a + " " + b);
			}
				
		}
		scanner.close();
		
		
	}

}