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