import java.util.Scanner;

public class Main {
	public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                for(int i=1; i>0; i++){
                        int iNum1 = scan.nextInt();
                        int iNum2 = scan.nextInt();
                        if(iNum1 == 0 && iNum2 == 0)
                                break;
                        if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        }
                        System.out.println(iNum1 + " " + iNum2);
                }
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                for(int i=1; i>0; i++){
                        int iNum1 = scan.nextInt();
                        int iNum2 = scan.nextInt();
                        if(iNum1 == 0 && iNum2 == 0)
                                break;
                        if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        }
                        System.out.println(iNum1 + " " + iNum2);
                }
	}
} Main public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                for(int i=1; i>0; i++){
                        int iNum1 = scan.nextInt();
                        int iNum2 = scan.nextInt();
                        if(iNum1 == 0 && iNum2 == 0)
                                break;
                        if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        }
                        System.out.println(iNum1 + " " + iNum2);
                }
	} main {
                Scanner scan = new Scanner(System.in);
                for(int i=1; i>0; i++){
                        int iNum1 = scan.nextInt();
                        int iNum2 = scan.nextInt();
                        if(iNum1 == 0 && iNum2 == 0)
                                break;
                        if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        }
                        System.out.println(iNum1 + " " + iNum2);
                }
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) for(int i=1; i>0; i++){
                        int iNum1 = scan.nextInt();
                        int iNum2 = scan.nextInt();
                        if(iNum1 == 0 && iNum2 == 0)
                                break;
                        if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        }
                        System.out.println(iNum1 + " " + iNum2);
                } int i=1; int i=1; i 1 i>0 i 0 i++ i++ i {
                        int iNum1 = scan.nextInt();
                        int iNum2 = scan.nextInt();
                        if(iNum1 == 0 && iNum2 == 0)
                                break;
                        if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        }
                        System.out.println(iNum1 + " " + iNum2);
                } {
                        int iNum1 = scan.nextInt();
                        int iNum2 = scan.nextInt();
                        if(iNum1 == 0 && iNum2 == 0)
                                break;
                        if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        }
                        System.out.println(iNum1 + " " + iNum2);
                } int iNum1 = scan.nextInt(); iNum1 scan.nextInt() scan.nextInt scan int iNum2 = scan.nextInt(); iNum2 scan.nextInt() scan.nextInt scan if(iNum1 == 0 && iNum2 == 0)
                                break; iNum1 == 0 && iNum2 == 0 iNum1 == 0 iNum1 0 iNum2 == 0 iNum2 0 break; if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        } iNum1 > iNum2 iNum1 iNum2 {
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        } int temp = iNum1; temp iNum1 iNum1 = iNum2 iNum1 iNum2 iNum2 = temp iNum2 temp System.out.println(iNum1 + " " + iNum2) System.out.println System.out System System.out iNum1 + " " + iNum2 iNum1 + " " + iNum2 iNum1 " " iNum2 String[] args args public class Main {
	public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                for(int i=1; i>0; i++){
                        int iNum1 = scan.nextInt();
                        int iNum2 = scan.nextInt();
                        if(iNum1 == 0 && iNum2 == 0)
                                break;
                        if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        }
                        System.out.println(iNum1 + " " + iNum2);
                }
	}
} public class Main {
	public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                for(int i=1; i>0; i++){
                        int iNum1 = scan.nextInt();
                        int iNum2 = scan.nextInt();
                        if(iNum1 == 0 && iNum2 == 0)
                                break;
                        if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        }
                        System.out.println(iNum1 + " " + iNum2);
                }
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                for(int i=1; i>0; i++){
                        int iNum1 = scan.nextInt();
                        int iNum2 = scan.nextInt();
                        if(iNum1 == 0 && iNum2 == 0)
                                break;
                        if(iNum1 > iNum2){
                        	int temp = iNum1;
                        	iNum1 = iNum2;
                        	iNum2 = temp;
                        }
                        System.out.println(iNum1 + " " + iNum2);
                }
	}
}