import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int temp, cnt = 0;
		int x[] = new int[3000], y[] = new int[3000];
		
		while(true){
			x[cnt] = sc.nextInt();
			y[cnt] = sc.nextInt();
			
			if(x[cnt] == 0 && y[cnt] == 0)
				break;
			
			if(x[cnt] > y[cnt]){
				temp = x[cnt];
				x[cnt] = y[cnt];
				y[cnt] = temp;
			}
			
			cnt ++;
		}
		
		for(int i = 0; i < cnt; i++)
			System.out.println(x[i] + " " + y[i]);
	}
} import java.util.*; util.* java class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int temp, cnt = 0;
		int x[] = new int[3000], y[] = new int[3000];
		
		while(true){
			x[cnt] = sc.nextInt();
			y[cnt] = sc.nextInt();
			
			if(x[cnt] == 0 && y[cnt] == 0)
				break;
			
			if(x[cnt] > y[cnt]){
				temp = x[cnt];
				x[cnt] = y[cnt];
				y[cnt] = temp;
			}
			
			cnt ++;
		}
		
		for(int i = 0; i < cnt; i++)
			System.out.println(x[i] + " " + y[i]);
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int temp, cnt = 0;
		int x[] = new int[3000], y[] = new int[3000];
		
		while(true){
			x[cnt] = sc.nextInt();
			y[cnt] = sc.nextInt();
			
			if(x[cnt] == 0 && y[cnt] == 0)
				break;
			
			if(x[cnt] > y[cnt]){
				temp = x[cnt];
				x[cnt] = y[cnt];
				y[cnt] = temp;
			}
			
			cnt ++;
		}
		
		for(int i = 0; i < cnt; i++)
			System.out.println(x[i] + " " + y[i]);
	} main {
		Scanner sc = new Scanner(System.in);
		int temp, cnt = 0;
		int x[] = new int[3000], y[] = new int[3000];
		
		while(true){
			x[cnt] = sc.nextInt();
			y[cnt] = sc.nextInt();
			
			if(x[cnt] == 0 && y[cnt] == 0)
				break;
			
			if(x[cnt] > y[cnt]){
				temp = x[cnt];
				x[cnt] = y[cnt];
				y[cnt] = temp;
			}
			
			cnt ++;
		}
		
		for(int i = 0; i < cnt; i++)
			System.out.println(x[i] + " " + y[i]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int temp temp cnt = 0; cnt 0 int x[] = new int[3000] x new int[3000] 3000 y[] = new int[3000]; y new int[3000] 3000 while(true){
			x[cnt] = sc.nextInt();
			y[cnt] = sc.nextInt();
			
			if(x[cnt] == 0 && y[cnt] == 0)
				break;
			
			if(x[cnt] > y[cnt]){
				temp = x[cnt];
				x[cnt] = y[cnt];
				y[cnt] = temp;
			}
			
			cnt ++;
		} true {
			x[cnt] = sc.nextInt();
			y[cnt] = sc.nextInt();
			
			if(x[cnt] == 0 && y[cnt] == 0)
				break;
			
			if(x[cnt] > y[cnt]){
				temp = x[cnt];
				x[cnt] = y[cnt];
				y[cnt] = temp;
			}
			
			cnt ++;
		} x[cnt] = sc.nextInt() x[cnt] x cnt sc.nextInt() sc.nextInt sc y[cnt] = sc.nextInt() y[cnt] y cnt sc.nextInt() sc.nextInt sc if(x[cnt] == 0 && y[cnt] == 0)
				break; x[cnt] == 0 && y[cnt] == 0 x[cnt] == 0 x[cnt] x cnt 0 y[cnt] == 0 y[cnt] y cnt 0 break; if(x[cnt] > y[cnt]){
				temp = x[cnt];
				x[cnt] = y[cnt];
				y[cnt] = temp;
			} x[cnt] > y[cnt] x[cnt] x cnt y[cnt] y cnt {
				temp = x[cnt];
				x[cnt] = y[cnt];
				y[cnt] = temp;
			} temp = x[cnt] temp x[cnt] x cnt x[cnt] = y[cnt] x[cnt] x cnt y[cnt] y cnt y[cnt] = temp y[cnt] y cnt temp cnt ++ cnt for(int i = 0; i < cnt; i++)
			System.out.println(x[i] + " " + y[i]); int i = 0; int i = 0; i 0 i < cnt i cnt i++ i++ i System.out.println(x[i] + " " + y[i]); System.out.println(x[i] + " " + y[i]) System.out.println System.out System System.out x[i] + " " + y[i] x[i] + " " + y[i] x[i] x i " " y[i] y i String args[] args
import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int temp, cnt = 0;
		int x[] = new int[3000], y[] = new int[3000];
		
		while(true){
			x[cnt] = sc.nextInt();
			y[cnt] = sc.nextInt();
			
			if(x[cnt] == 0 && y[cnt] == 0)
				break;
			
			if(x[cnt] > y[cnt]){
				temp = x[cnt];
				x[cnt] = y[cnt];
				y[cnt] = temp;
			}
			
			cnt ++;
		}
		
		for(int i = 0; i < cnt; i++)
			System.out.println(x[i] + " " + y[i]);
	}
}