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

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