import java.util.*;
class Main{
    Scanner sc=new Scanner(System.in);
    void main(){
	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);
	}
    }
    public static void main(String[]ag){
	new Main().main();
    }
} import java.util.*; util.* java class Main{
    Scanner sc=new Scanner(System.in);
    void main(){
	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);
	}
    }
    public static void main(String[]ag){
	new Main().main();
    }
} Main Scanner sc=new Scanner(System.in); sc new Scanner(System.in) void main(){
	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);
	}
    } main {
	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);
	}
    } 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);
	} 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);
	} 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 System.out System System.out 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 public static void main(String[]ag){
	new Main().main();
    } main {
	new Main().main();
    } new Main().main() new Main().main new Main() String[]ag ag
import java.util.*;
class Main{
    Scanner sc=new Scanner(System.in);
    void main(){
	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);
	}
    }
    public static void main(String[]ag){
	new Main().main();
    }
}