import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String ans = "";
		int a, b;
		while(scan.hasNext()){
			//scan.useDelimiter(" |\n");
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());
			if(a == 0 && b == 0){
				break;
			}else if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			}
			System.out.println(ans);

		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String ans = "";
		int a, b;
		while(scan.hasNext()){
			//scan.useDelimiter(" |\n");
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());
			if(a == 0 && b == 0){
				break;
			}else if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			}
			System.out.println(ans);

		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String ans = "";
		int a, b;
		while(scan.hasNext()){
			//scan.useDelimiter(" |\n");
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());
			if(a == 0 && b == 0){
				break;
			}else if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			}
			System.out.println(ans);

		}
	} main {
		Scanner scan = new Scanner(System.in);
		String ans = "";
		int a, b;
		while(scan.hasNext()){
			//scan.useDelimiter(" |\n");
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());
			if(a == 0 && b == 0){
				break;
			}else if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			}
			System.out.println(ans);

		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String ans = ""; ans "" int a a b; b while(scan.hasNext()){
			//scan.useDelimiter(" |\n");
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());
			if(a == 0 && b == 0){
				break;
			}else if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			}
			System.out.println(ans);

		} scan.hasNext() scan.hasNext scan {
			//scan.useDelimiter(" |\n");
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());
			if(a == 0 && b == 0){
				break;
			}else if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			}
			System.out.println(ans);

		} a = Integer.parseInt(scan.next()) a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan b = Integer.parseInt(scan.next()) b Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan if(a == 0 && b == 0){
				break;
			}else if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			} a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {
				break;
			} break; if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			} a < b a b {
				ans = a + " " + b;
			} ans = a + " " + b ans a + " " + b a + " " + b a " " b if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			} b < a b a {
				ans = b + " " + a;
			} ans = b + " " + a ans b + " " + a b + " " + a b " " a if(a == b){
				ans = a + " " + b;
			} a == b a b {
				ans = a + " " + b;
			} ans = a + " " + b ans a + " " + b a + " " + b a " " b System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String ans = "";
		int a, b;
		while(scan.hasNext()){
			//scan.useDelimiter(" |\n");
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());
			if(a == 0 && b == 0){
				break;
			}else if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			}
			System.out.println(ans);

		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String ans = "";
		int a, b;
		while(scan.hasNext()){
			//scan.useDelimiter(" |\n");
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());
			if(a == 0 && b == 0){
				break;
			}else if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			}
			System.out.println(ans);

		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String ans = "";
		int a, b;
		while(scan.hasNext()){
			//scan.useDelimiter(" |\n");
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());
			if(a == 0 && b == 0){
				break;
			}else if(a < b){
				ans = a + " " + b;
			}else if(b < a){
				ans = b + " " + a;
			}else if(a == b){
				ans = a + " " + b;
			}
			System.out.println(ans);

		}
	}
}