import java.util.Scanner;

/**
 * @author kawakami
 
*/
class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
	       
        int x;
        int y;

       
           
           x = as.nextInt();
           y = as.nextInt();
           
           if(x<y){
               System.out.println(x+" "+y);

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

              } 
           
           
           

        while(true){
           
           
           x = as.nextInt();
           y = as.nextInt();
           if(x==0 && y==0){
               break;
  }
           
           
           if(x<y){
        	   
              System.out.println(x+" "+y);

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

             } 
       }

	}

} import java.util.Scanner; Scanner java.util class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
	       
        int x;
        int y;

       
           
           x = as.nextInt();
           y = as.nextInt();
           
           if(x<y){
               System.out.println(x+" "+y);

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

              } 
           
           
           

        while(true){
           
           
           x = as.nextInt();
           y = as.nextInt();
           if(x==0 && y==0){
               break;
  }
           
           
           if(x<y){
        	   
              System.out.println(x+" "+y);

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

             } 
       }

	}

} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
	       
        int x;
        int y;

       
           
           x = as.nextInt();
           y = as.nextInt();
           
           if(x<y){
               System.out.println(x+" "+y);

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

              } 
           
           
           

        while(true){
           
           
           x = as.nextInt();
           y = as.nextInt();
           if(x==0 && y==0){
               break;
  }
           
           
           if(x<y){
        	   
              System.out.println(x+" "+y);

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

             } 
       }

	} main {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
	       
        int x;
        int y;

       
           
           x = as.nextInt();
           y = as.nextInt();
           
           if(x<y){
               System.out.println(x+" "+y);

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

              } 
           
           
           

        while(true){
           
           
           x = as.nextInt();
           y = as.nextInt();
           if(x==0 && y==0){
               break;
  }
           
           
           if(x<y){
        	   
              System.out.println(x+" "+y);

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

             } 
       }

	} Scanner as = new Scanner(System.in); as new Scanner(System.in) int x; x int y; y x = as.nextInt() x as.nextInt() as.nextInt as y = as.nextInt() y as.nextInt() as.nextInt as 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 while(true){
           
           
           x = as.nextInt();
           y = as.nextInt();
           if(x==0 && y==0){
               break;
  }
           
           
           if(x<y){
        	   
              System.out.println(x+" "+y);

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

             } 
       } true {
           
           
           x = as.nextInt();
           y = as.nextInt();
           if(x==0 && y==0){
               break;
  }
           
           
           if(x<y){
        	   
              System.out.println(x+" "+y);

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

             } 
       } x = as.nextInt() x as.nextInt() as.nextInt as y = as.nextInt() y as.nextInt() as.nextInt as if(x==0 && y==0){
               break;
  } x==0 && y==0 x==0 x 0 y==0 y 0 {
               break;
  } 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 String[] args args
import java.util.Scanner;

/**
 * @author kawakami
 
*/
class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
	       
        int x;
        int y;

       
           
           x = as.nextInt();
           y = as.nextInt();
           
           if(x<y){
               System.out.println(x+" "+y);

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

              } 
           
           
           

        while(true){
           
           
           x = as.nextInt();
           y = as.nextInt();
           if(x==0 && y==0){
               break;
  }
           
           
           if(x<y){
        	   
              System.out.println(x+" "+y);

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

             } 
       }

	}

}