import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;


public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		for (int i = 0;; i++) {
			int x=scan.nextInt();
			int y=scan.nextInt();
			if(x==0 && y==0)
				break;
			if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y);
		}

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		for (int i = 0;; i++) {
			int x=scan.nextInt();
			int y=scan.nextInt();
			if(x==0 && y==0)
				break;
			if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y);
		}

	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		for (int i = 0;; i++) {
			int x=scan.nextInt();
			int y=scan.nextInt();
			if(x==0 && y==0)
				break;
			if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y);
		}

	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		for (int i = 0;; i++) {
			int x=scan.nextInt();
			int y=scan.nextInt();
			if(x==0 && y==0)
				break;
			if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y);
		}

	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in))); scan new Scanner(new BufferedReader(new InputStreamReader(System.in))) for (int i = 0;; i++) {
			int x=scan.nextInt();
			int y=scan.nextInt();
			if(x==0 && y==0)
				break;
			if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y);
		} int i = 0; int i = 0; i 0 i++ i++ i {
			int x=scan.nextInt();
			int y=scan.nextInt();
			if(x==0 && y==0)
				break;
			if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y);
		} {
			int x=scan.nextInt();
			int y=scan.nextInt();
			if(x==0 && y==0)
				break;
			if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y);
		} int x=scan.nextInt(); x scan.nextInt() scan.nextInt scan int y=scan.nextInt(); y scan.nextInt() scan.nextInt scan if(x==0 && y==0)
				break; x==0 && y==0 x==0 x 0 y==0 y 0 break; if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y); x>y x y System.out.println(y+" "+x) System.out.println System.out System System.out y+" "+x y+" "+x y " " x System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		for (int i = 0;; i++) {
			int x=scan.nextInt();
			int y=scan.nextInt();
			if(x==0 && y==0)
				break;
			if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y);
		}

	}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		for (int i = 0;; i++) {
			int x=scan.nextInt();
			int y=scan.nextInt();
			if(x==0 && y==0)
				break;
			if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y);
		}

	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;


public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		for (int i = 0;; i++) {
			int x=scan.nextInt();
			int y=scan.nextInt();
			if(x==0 && y==0)
				break;
			if(x>y)
				System.out.println(y+" "+x);
			else
				System.out.println(x+" "+y);
		}

	}

}