import java.util.Scanner;

  
public class Main {
	
	
  public static void main(String[] args) {
	  Scanner sc=new Scanner(System.in);
	  
	  int n=Integer.MAX_VALUE;
	  
	  for(int i=0;i<n;i++){
		  int x=Integer.parseInt(sc.next());
		  int y=Integer.parseInt(sc.next());
		  if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  }
	  }
    
  }
} import java.util.Scanner; Scanner java.util public class Main {
	
	
  public static void main(String[] args) {
	  Scanner sc=new Scanner(System.in);
	  
	  int n=Integer.MAX_VALUE;
	  
	  for(int i=0;i<n;i++){
		  int x=Integer.parseInt(sc.next());
		  int y=Integer.parseInt(sc.next());
		  if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  }
	  }
    
  }
} Main public static void main(String[] args) {
	  Scanner sc=new Scanner(System.in);
	  
	  int n=Integer.MAX_VALUE;
	  
	  for(int i=0;i<n;i++){
		  int x=Integer.parseInt(sc.next());
		  int y=Integer.parseInt(sc.next());
		  if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  }
	  }
    
  } main {
	  Scanner sc=new Scanner(System.in);
	  
	  int n=Integer.MAX_VALUE;
	  
	  for(int i=0;i<n;i++){
		  int x=Integer.parseInt(sc.next());
		  int y=Integer.parseInt(sc.next());
		  if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  }
	  }
    
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n=Integer.MAX_VALUE; n Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i=0;i<n;i++){
		  int x=Integer.parseInt(sc.next());
		  int y=Integer.parseInt(sc.next());
		  if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  }
	  } int i=0; int i=0; i 0 i<n i n i++ i++ i {
		  int x=Integer.parseInt(sc.next());
		  int y=Integer.parseInt(sc.next());
		  if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  }
	  } {
		  int x=Integer.parseInt(sc.next());
		  int y=Integer.parseInt(sc.next());
		  if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  }
	  } int x=Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int y=Integer.parseInt(sc.next()); y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  } x==0&&y==0 x==0 x 0 y==0 y 0 {
			  break;
		  } break; if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(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 if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  } 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 if(x==y){
			  System.out.println(x +" "+ y);
		  } 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 String[] args args public class Main {
	
	
  public static void main(String[] args) {
	  Scanner sc=new Scanner(System.in);
	  
	  int n=Integer.MAX_VALUE;
	  
	  for(int i=0;i<n;i++){
		  int x=Integer.parseInt(sc.next());
		  int y=Integer.parseInt(sc.next());
		  if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  }
	  }
    
  }
} public class Main {
	
	
  public static void main(String[] args) {
	  Scanner sc=new Scanner(System.in);
	  
	  int n=Integer.MAX_VALUE;
	  
	  for(int i=0;i<n;i++){
		  int x=Integer.parseInt(sc.next());
		  int y=Integer.parseInt(sc.next());
		  if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  }
	  }
    
  }
} Main
import java.util.Scanner;

  
public class Main {
	
	
  public static void main(String[] args) {
	  Scanner sc=new Scanner(System.in);
	  
	  int n=Integer.MAX_VALUE;
	  
	  for(int i=0;i<n;i++){
		  int x=Integer.parseInt(sc.next());
		  int y=Integer.parseInt(sc.next());
		  if(x==0&&y==0){
			  break;
		  }
		  else if(x>y){
		  System.out.println(y +" "+ x);
		  }
		  else if(x<y){
			  System.out.println(x +" "+ y);
		  }
		  else if(x==y){
			  System.out.println(x +" "+ y);
		  }
	  }
    
  }
}