import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i=1;
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0&&y==0)break;
			if(x<y){
				System.out.println(x+" "+y);
			}else{
				System.out.println(y+" "+x);
			}
			i++;
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i=1;
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0&&y==0)break;
			if(x<y){
				System.out.println(x+" "+y);
			}else{
				System.out.println(y+" "+x);
			}
			i++;
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i=1;
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0&&y==0)break;
			if(x<y){
				System.out.println(x+" "+y);
			}else{
				System.out.println(y+" "+x);
			}
			i++;
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int i=1;
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0&&y==0)break;
			if(x<y){
				System.out.println(x+" "+y);
			}else{
				System.out.println(y+" "+x);
			}
			i++;
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int i=1; i 1 while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0&&y==0)break;
			if(x<y){
				System.out.println(x+" "+y);
			}else{
				System.out.println(y+" "+x);
			}
			i++;
		} true {
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0&&y==0)break;
			if(x<y){
				System.out.println(x+" "+y);
			}else{
				System.out.println(y+" "+x);
			}
			i++;
		} int x=sc.nextInt(); x sc.nextInt() sc.nextInt sc int y=sc.nextInt(); y sc.nextInt() sc.nextInt sc 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(x+" "+y);
			}else{
				System.out.println(y+" "+x);
			} x<y x y {
				System.out.println(x+" "+y);
			} System.out.println(x+" "+y) System.out.println System.out System System.out x+" "+y x+" "+y x " " y {
				System.out.println(y+" "+x);
			} System.out.println(y+" "+x) System.out.println System.out System System.out y+" "+x y+" "+x y " " x i++ i String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i=1;
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0&&y==0)break;
			if(x<y){
				System.out.println(x+" "+y);
			}else{
				System.out.println(y+" "+x);
			}
			i++;
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i=1;
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0&&y==0)break;
			if(x<y){
				System.out.println(x+" "+y);
			}else{
				System.out.println(y+" "+x);
			}
			i++;
		}
	}
} Main
import java.util.Scanner;

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