import java.util.Scanner;
public class Main{

    int x,y;
 



    public void input(){
	Scanner scan = new Scanner(System.in);
	while(true){

	x = scan.nextInt();
        y = scan.nextInt();

	if(x == 0 && y == 0)break;
        output();
	}
	

    }
    public void output(){
     
	if(x < y){
	    System.out.println(x+" "+y);
      	}else{
	    System.out.println(y+" "+x);

		}



    }
    



    public static void main(String[] args){
	Main  p = new Main();
	p.input();
	//  	p.output();
    }
}
  import java.util.Scanner; Scanner java.util public class Main{

    int x,y;
 



    public void input(){
	Scanner scan = new Scanner(System.in);
	while(true){

	x = scan.nextInt();
        y = scan.nextInt();

	if(x == 0 && y == 0)break;
        output();
	}
	

    }
    public void output(){
     
	if(x < y){
	    System.out.println(x+" "+y);
      	}else{
	    System.out.println(y+" "+x);

		}



    }
    



    public static void main(String[] args){
	Main  p = new Main();
	p.input();
	//  	p.output();
    }
} Main int x x y; y public void input(){
	Scanner scan = new Scanner(System.in);
	while(true){

	x = scan.nextInt();
        y = scan.nextInt();

	if(x == 0 && y == 0)break;
        output();
	}
	

    } input {
	Scanner scan = new Scanner(System.in);
	while(true){

	x = scan.nextInt();
        y = scan.nextInt();

	if(x == 0 && y == 0)break;
        output();
	}
	

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(true){

	x = scan.nextInt();
        y = scan.nextInt();

	if(x == 0 && y == 0)break;
        output();
	} true {

	x = scan.nextInt();
        y = scan.nextInt();

	if(x == 0 && y == 0)break;
        output();
	} x = scan.nextInt() x scan.nextInt() scan.nextInt scan 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; output() output public void output(){
     
	if(x < y){
	    System.out.println(x+" "+y);
      	}else{
	    System.out.println(y+" "+x);

		}



    } output {
     
	if(x < y){
	    System.out.println(x+" "+y);
      	}else{
	    System.out.println(y+" "+x);

		}



    } 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 public static void main(String[] args){
	Main  p = new Main();
	p.input();
	//  	p.output();
    } main {
	Main  p = new Main();
	p.input();
	//  	p.output();
    } Main  p = new Main(); p new Main() p.input() p.input p String[] args args public class Main{

    int x,y;
 



    public void input(){
	Scanner scan = new Scanner(System.in);
	while(true){

	x = scan.nextInt();
        y = scan.nextInt();

	if(x == 0 && y == 0)break;
        output();
	}
	

    }
    public void output(){
     
	if(x < y){
	    System.out.println(x+" "+y);
      	}else{
	    System.out.println(y+" "+x);

		}



    }
    



    public static void main(String[] args){
	Main  p = new Main();
	p.input();
	//  	p.output();
    }
} public class Main{

    int x,y;
 



    public void input(){
	Scanner scan = new Scanner(System.in);
	while(true){

	x = scan.nextInt();
        y = scan.nextInt();

	if(x == 0 && y == 0)break;
        output();
	}
	

    }
    public void output(){
     
	if(x < y){
	    System.out.println(x+" "+y);
      	}else{
	    System.out.println(y+" "+x);

		}



    }
    



    public static void main(String[] args){
	Main  p = new Main();
	p.input();
	//  	p.output();
    }
} Main
import java.util.Scanner;
public class Main{

    int x,y;
 



    public void input(){
	Scanner scan = new Scanner(System.in);
	while(true){

	x = scan.nextInt();
        y = scan.nextInt();

	if(x == 0 && y == 0)break;
        output();
	}
	

    }
    public void output(){
     
	if(x < y){
	    System.out.println(x+" "+y);
      	}else{
	    System.out.println(y+" "+x);

		}



    }
    



    public static void main(String[] args){
	Main  p = new Main();
	p.input();
	//  	p.output();
    }
}
 