import java.util.Scanner;
import java.util.ArrayList;

class Main {

	public static void main(String[] args) {
	
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> x = new ArrayList<Integer>();
		ArrayList<Integer> y = new ArrayList<Integer>();
		
		int a,b;
		
		while(true){
			a = sc.nextInt();
			b = sc.nextInt();
			
			if(a == 0 && b == 0)
				break;
			
			x.add(a);
			y.add(b);
			
		}
		
		int temp;
		int i;
		
		for(i = 0; i < x.size(); i++){
			int val1 = x.get(i);
			int val2 = y.get(i);
			
			if(val1 > val2){
				temp = val2;
				val2 = val1;
				val1 = temp;
			}
			
			System.out.println(val1 + " " + val2);
		}
		
	}

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

	public static void main(String[] args) {
	
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> x = new ArrayList<Integer>();
		ArrayList<Integer> y = new ArrayList<Integer>();
		
		int a,b;
		
		while(true){
			a = sc.nextInt();
			b = sc.nextInt();
			
			if(a == 0 && b == 0)
				break;
			
			x.add(a);
			y.add(b);
			
		}
		
		int temp;
		int i;
		
		for(i = 0; i < x.size(); i++){
			int val1 = x.get(i);
			int val2 = y.get(i);
			
			if(val1 > val2){
				temp = val2;
				val2 = val1;
				val1 = temp;
			}
			
			System.out.println(val1 + " " + val2);
		}
		
	}

} Main public static void main(String[] args) {
	
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> x = new ArrayList<Integer>();
		ArrayList<Integer> y = new ArrayList<Integer>();
		
		int a,b;
		
		while(true){
			a = sc.nextInt();
			b = sc.nextInt();
			
			if(a == 0 && b == 0)
				break;
			
			x.add(a);
			y.add(b);
			
		}
		
		int temp;
		int i;
		
		for(i = 0; i < x.size(); i++){
			int val1 = x.get(i);
			int val2 = y.get(i);
			
			if(val1 > val2){
				temp = val2;
				val2 = val1;
				val1 = temp;
			}
			
			System.out.println(val1 + " " + val2);
		}
		
	} main {
	
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> x = new ArrayList<Integer>();
		ArrayList<Integer> y = new ArrayList<Integer>();
		
		int a,b;
		
		while(true){
			a = sc.nextInt();
			b = sc.nextInt();
			
			if(a == 0 && b == 0)
				break;
			
			x.add(a);
			y.add(b);
			
		}
		
		int temp;
		int i;
		
		for(i = 0; i < x.size(); i++){
			int val1 = x.get(i);
			int val2 = y.get(i);
			
			if(val1 > val2){
				temp = val2;
				val2 = val1;
				val1 = temp;
			}
			
			System.out.println(val1 + " " + val2);
		}
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> x = new ArrayList<Integer>(); x new ArrayList<Integer>() ArrayList<Integer> y = new ArrayList<Integer>(); y new ArrayList<Integer>() int a a b; b while(true){
			a = sc.nextInt();
			b = sc.nextInt();
			
			if(a == 0 && b == 0)
				break;
			
			x.add(a);
			y.add(b);
			
		} true {
			a = sc.nextInt();
			b = sc.nextInt();
			
			if(a == 0 && b == 0)
				break;
			
			x.add(a);
			y.add(b);
			
		} 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; x.add(a) x.add x a y.add(b) y.add y b int temp; temp int i; i for(i = 0; i < x.size(); i++){
			int val1 = x.get(i);
			int val2 = y.get(i);
			
			if(val1 > val2){
				temp = val2;
				val2 = val1;
				val1 = temp;
			}
			
			System.out.println(val1 + " " + val2);
		} i = 0; i = 0 i 0 i < x.size() i x.size() x.size x i++ i++ i {
			int val1 = x.get(i);
			int val2 = y.get(i);
			
			if(val1 > val2){
				temp = val2;
				val2 = val1;
				val1 = temp;
			}
			
			System.out.println(val1 + " " + val2);
		} {
			int val1 = x.get(i);
			int val2 = y.get(i);
			
			if(val1 > val2){
				temp = val2;
				val2 = val1;
				val1 = temp;
			}
			
			System.out.println(val1 + " " + val2);
		} int val1 = x.get(i); val1 x.get(i) x.get x i int val2 = y.get(i); val2 y.get(i) y.get y i if(val1 > val2){
				temp = val2;
				val2 = val1;
				val1 = temp;
			} val1 > val2 val1 val2 {
				temp = val2;
				val2 = val1;
				val1 = temp;
			} temp = val2 temp val2 val2 = val1 val2 val1 val1 = temp val1 temp System.out.println(val1 + " " + val2) System.out.println System.out System System.out val1 + " " + val2 val1 + " " + val2 val1 " " val2 String[] args args
import java.util.Scanner;
import java.util.ArrayList;

class Main {

	public static void main(String[] args) {
	
		Scanner sc = new Scanner(System.in);
		
		ArrayList<Integer> x = new ArrayList<Integer>();
		ArrayList<Integer> y = new ArrayList<Integer>();
		
		int a,b;
		
		while(true){
			a = sc.nextInt();
			b = sc.nextInt();
			
			if(a == 0 && b == 0)
				break;
			
			x.add(a);
			y.add(b);
			
		}
		
		int temp;
		int i;
		
		for(i = 0; i < x.size(); i++){
			int val1 = x.get(i);
			int val2 = y.get(i);
			
			if(val1 > val2){
				temp = val2;
				val2 = val1;
				val1 = temp;
			}
			
			System.out.println(val1 + " " + val2);
		}
		
	}

}