import java.util.Arrays;
import java.util.Scanner;


public class Main {
	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		
		while(true){
			final long a = sc.nextLong();
			final long b = sc.nextLong();
			
			if(a == 0 && b == 0){
				break;
			}
			
			System.out.println(Math.min(a, b) + " " + Math.max(a, b));
		}
		
		
	}
	
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		
		while(true){
			final long a = sc.nextLong();
			final long b = sc.nextLong();
			
			if(a == 0 && b == 0){
				break;
			}
			
			System.out.println(Math.min(a, b) + " " + Math.max(a, b));
		}
		
		
	}
	
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		
		while(true){
			final long a = sc.nextLong();
			final long b = sc.nextLong();
			
			if(a == 0 && b == 0){
				break;
			}
			
			System.out.println(Math.min(a, b) + " " + Math.max(a, b));
		}
		
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		while(true){
			final long a = sc.nextLong();
			final long b = sc.nextLong();
			
			if(a == 0 && b == 0){
				break;
			}
			
			System.out.println(Math.min(a, b) + " " + Math.max(a, b));
		}
		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(true){
			final long a = sc.nextLong();
			final long b = sc.nextLong();
			
			if(a == 0 && b == 0){
				break;
			}
			
			System.out.println(Math.min(a, b) + " " + Math.max(a, b));
		} true {
			final long a = sc.nextLong();
			final long b = sc.nextLong();
			
			if(a == 0 && b == 0){
				break;
			}
			
			System.out.println(Math.min(a, b) + " " + Math.max(a, b));
		} final long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc final long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc if(a == 0 && b == 0){
				break;
			} a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {
				break;
			} break; System.out.println(Math.min(a, b) + " " + Math.max(a, b)) System.out.println System.out System System.out Math.min(a, b) + " " + Math.max(a, b) Math.min(a, b) + " " + Math.max(a, b) Math.min(a, b) Math.min Math a b " " Math.max(a, b) Math.max Math a b String args[] args public class Main {
	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		
		while(true){
			final long a = sc.nextLong();
			final long b = sc.nextLong();
			
			if(a == 0 && b == 0){
				break;
			}
			
			System.out.println(Math.min(a, b) + " " + Math.max(a, b));
		}
		
		
	}
	
} public class Main {
	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		
		while(true){
			final long a = sc.nextLong();
			final long b = sc.nextLong();
			
			if(a == 0 && b == 0){
				break;
			}
			
			System.out.println(Math.min(a, b) + " " + Math.max(a, b));
		}
		
		
	}
	
} Main
import java.util.Arrays;
import java.util.Scanner;


public class Main {
	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		
		while(true){
			final long a = sc.nextLong();
			final long b = sc.nextLong();
			
			if(a == 0 && b == 0){
				break;
			}
			
			System.out.println(Math.min(a, b) + " " + Math.max(a, b));
		}
		
		
	}
	
}