import java.io.IOException;
import java.io.InputStreamReader;
import java.io.* ;
 
class Main{
  public static void main(String[] args)throws IOException{
      
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\?????????
    String str = br.readLine();
  
    String[] strAry = str.split(" ");
    int a = Integer.parseInt(strAry[0]);
  	int b = Integer.parseInt(strAry[1]);
  	int c;
  	while ( a!=0 || b!=0 ) {  
  		if (a < b) {}
  			
  		else if ( a> b) {c= a; a= b; b= c;
  		}
  		System.out.println( a + " " + b);
  	     str = br.readLine();
 		 strAry = str.split(" ");
         a = Integer.parseInt(strAry[0]);
         b = Integer.parseInt(strAry[1]);
  	}
  	}	
  		
  	}
   import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.* ; io.* java class Main{
  public static void main(String[] args)throws IOException{
      
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\?????????
    String str = br.readLine();
  
    String[] strAry = str.split(" ");
    int a = Integer.parseInt(strAry[0]);
  	int b = Integer.parseInt(strAry[1]);
  	int c;
  	while ( a!=0 || b!=0 ) {  
  		if (a < b) {}
  			
  		else if ( a> b) {c= a; a= b; b= c;
  		}
  		System.out.println( a + " " + b);
  	     str = br.readLine();
 		 strAry = str.split(" ");
         a = Integer.parseInt(strAry[0]);
         b = Integer.parseInt(strAry[1]);
  	}
  	}	
  		
  	} Main public static void main(String[] args)throws IOException{
      
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\?????????
    String str = br.readLine();
  
    String[] strAry = str.split(" ");
    int a = Integer.parseInt(strAry[0]);
  	int b = Integer.parseInt(strAry[1]);
  	int c;
  	while ( a!=0 || b!=0 ) {  
  		if (a < b) {}
  			
  		else if ( a> b) {c= a; a= b; b= c;
  		}
  		System.out.println( a + " " + b);
  	     str = br.readLine();
 		 strAry = str.split(" ");
         a = Integer.parseInt(strAry[0]);
         b = Integer.parseInt(strAry[1]);
  	}
  	} main {
      
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\?????????
    String str = br.readLine();
  
    String[] strAry = str.split(" ");
    int a = Integer.parseInt(strAry[0]);
  	int b = Integer.parseInt(strAry[1]);
  	int c;
  	while ( a!=0 || b!=0 ) {  
  		if (a < b) {}
  			
  		else if ( a> b) {c= a; a= b; b= c;
  		}
  		System.out.println( a + " " + b);
  	     str = br.readLine();
 		 strAry = str.split(" ");
         a = Integer.parseInt(strAry[0]);
         b = Integer.parseInt(strAry[1]);
  	}
  	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br String[] strAry = str.split(" "); strAry str.split(" ") str.split str " " int a = Integer.parseInt(strAry[0]); a Integer.parseInt(strAry[0]) Integer.parseInt Integer strAry[0] strAry 0 int b = Integer.parseInt(strAry[1]); b Integer.parseInt(strAry[1]) Integer.parseInt Integer strAry[1] strAry 1 int c; c while ( a!=0 || b!=0 ) {  
  		if (a < b) {}
  			
  		else if ( a> b) {c= a; a= b; b= c;
  		}
  		System.out.println( a + " " + b);
  	     str = br.readLine();
 		 strAry = str.split(" ");
         a = Integer.parseInt(strAry[0]);
         b = Integer.parseInt(strAry[1]);
  	} a!=0 || b!=0 a!=0 a 0 b!=0 b 0 {  
  		if (a < b) {}
  			
  		else if ( a> b) {c= a; a= b; b= c;
  		}
  		System.out.println( a + " " + b);
  	     str = br.readLine();
 		 strAry = str.split(" ");
         a = Integer.parseInt(strAry[0]);
         b = Integer.parseInt(strAry[1]);
  	} if (a < b) {}
  			
  		else if ( a> b) {c= a; a= b; b= c;
  		} a < b a b {} if ( a> b) {c= a; a= b; b= c;
  		} a> b a b {c= a; a= b; b= c;
  		} c= a c a a= b a b b= c b c System.out.println( a + " " + b) System.out.println System.out System System.out a + " " + b a + " " + b a " " b str = br.readLine() str br.readLine() br.readLine br strAry = str.split(" ") strAry str.split(" ") str.split str " " a = Integer.parseInt(strAry[0]) a Integer.parseInt(strAry[0]) Integer.parseInt Integer strAry[0] strAry 0 b = Integer.parseInt(strAry[1]) b Integer.parseInt(strAry[1]) Integer.parseInt Integer strAry[1] strAry 1 String[] args args
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.* ;
 
class Main{
  public static void main(String[] args)throws IOException{
      
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\?????????
    String str = br.readLine();
  
    String[] strAry = str.split(" ");
    int a = Integer.parseInt(strAry[0]);
  	int b = Integer.parseInt(strAry[1]);
  	int c;
  	while ( a!=0 || b!=0 ) {  
  		if (a < b) {}
  			
  		else if ( a> b) {c= a; a= b; b= c;
  		}
  		System.out.println( a + " " + b);
  	     str = br.readLine();
 		 strAry = str.split(" ");
         a = Integer.parseInt(strAry[0]);
         b = Integer.parseInt(strAry[1]);
  	}
  	}	
  		
  	}
  