import java.io.*;

class Main{
 public static void main(String[] args)throws IOException{
  int x,y;
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  
  
  
  while(true){
    String str = br.readLine(); 
    String[] strAry = str.split(" ");
    x = Integer.parseInt(strAry[0]);  
    y = Integer.parseInt(strAry[1]);   
    if(x==0&&y==0) break;   
    if(x<=y){
      System.out.println(x +" "+ y);
     
    }else{    
      System.out.println(y +" "+ x);
     }
  }
 }
} import java.io.*; io.* java class Main{
 public static void main(String[] args)throws IOException{
  int x,y;
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  
  
  
  while(true){
    String str = br.readLine(); 
    String[] strAry = str.split(" ");
    x = Integer.parseInt(strAry[0]);  
    y = Integer.parseInt(strAry[1]);   
    if(x==0&&y==0) break;   
    if(x<=y){
      System.out.println(x +" "+ y);
     
    }else{    
      System.out.println(y +" "+ x);
     }
  }
 }
} Main public static void main(String[] args)throws IOException{
  int x,y;
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  
  
  
  while(true){
    String str = br.readLine(); 
    String[] strAry = str.split(" ");
    x = Integer.parseInt(strAry[0]);  
    y = Integer.parseInt(strAry[1]);   
    if(x==0&&y==0) break;   
    if(x<=y){
      System.out.println(x +" "+ y);
     
    }else{    
      System.out.println(y +" "+ x);
     }
  }
 } main {
  int x,y;
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  
  
  
  while(true){
    String str = br.readLine(); 
    String[] strAry = str.split(" ");
    x = Integer.parseInt(strAry[0]);  
    y = Integer.parseInt(strAry[1]);   
    if(x==0&&y==0) break;   
    if(x<=y){
      System.out.println(x +" "+ y);
     
    }else{    
      System.out.println(y +" "+ x);
     }
  }
 } int x x y; y BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
    String str = br.readLine(); 
    String[] strAry = str.split(" ");
    x = Integer.parseInt(strAry[0]);  
    y = Integer.parseInt(strAry[1]);   
    if(x==0&&y==0) break;   
    if(x<=y){
      System.out.println(x +" "+ y);
     
    }else{    
      System.out.println(y +" "+ x);
     }
  } true {
    String str = br.readLine(); 
    String[] strAry = str.split(" ");
    x = Integer.parseInt(strAry[0]);  
    y = Integer.parseInt(strAry[1]);   
    if(x==0&&y==0) break;   
    if(x<=y){
      System.out.println(x +" "+ y);
     
    }else{    
      System.out.println(y +" "+ x);
     }
  } String str = br.readLine(); str br.readLine() br.readLine br String[] strAry = str.split(" "); strAry str.split(" ") str.split str " " x = Integer.parseInt(strAry[0]) x Integer.parseInt(strAry[0]) Integer.parseInt Integer strAry[0] strAry 0 y = Integer.parseInt(strAry[1]) y Integer.parseInt(strAry[1]) Integer.parseInt Integer strAry[1] strAry 1 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(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.io.*;

class Main{
 public static void main(String[] args)throws IOException{
  int x,y;
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  
  
  
  while(true){
    String str = br.readLine(); 
    String[] strAry = str.split(" ");
    x = Integer.parseInt(strAry[0]);  
    y = Integer.parseInt(strAry[1]);   
    if(x==0&&y==0) break;   
    if(x<=y){
      System.out.println(x +" "+ y);
     
    }else{    
      System.out.println(y +" "+ x);
     }
  }
 }
}