import java.util.Scanner;

class Main{
  public static void main(String[] args) {
    
	  Scanner sc = new Scanner(System.in);
	  
	  int x = -1;
	  
	  int y = 1;
	  
	  while(x!=0 || y!=0){
		  
		  x = sc.nextInt();
		  
		  y = sc.nextInt();
		  
		  if(x > y){
			  System.out.println(y+" "+x);
		  }else if (x < y){
			  System.out.println(x+" "+y);
		  }else if(x == y){
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  System.out.println(x+" "+y);
			  }
		  } 
		  
	  }
 

  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args) {
    
	  Scanner sc = new Scanner(System.in);
	  
	  int x = -1;
	  
	  int y = 1;
	  
	  while(x!=0 || y!=0){
		  
		  x = sc.nextInt();
		  
		  y = sc.nextInt();
		  
		  if(x > y){
			  System.out.println(y+" "+x);
		  }else if (x < y){
			  System.out.println(x+" "+y);
		  }else if(x == y){
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  System.out.println(x+" "+y);
			  }
		  } 
		  
	  }
 

  }
} Main public static void main(String[] args) {
    
	  Scanner sc = new Scanner(System.in);
	  
	  int x = -1;
	  
	  int y = 1;
	  
	  while(x!=0 || y!=0){
		  
		  x = sc.nextInt();
		  
		  y = sc.nextInt();
		  
		  if(x > y){
			  System.out.println(y+" "+x);
		  }else if (x < y){
			  System.out.println(x+" "+y);
		  }else if(x == y){
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  System.out.println(x+" "+y);
			  }
		  } 
		  
	  }
 

  } main {
    
	  Scanner sc = new Scanner(System.in);
	  
	  int x = -1;
	  
	  int y = 1;
	  
	  while(x!=0 || y!=0){
		  
		  x = sc.nextInt();
		  
		  y = sc.nextInt();
		  
		  if(x > y){
			  System.out.println(y+" "+x);
		  }else if (x < y){
			  System.out.println(x+" "+y);
		  }else if(x == y){
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  System.out.println(x+" "+y);
			  }
		  } 
		  
	  }
 

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = -1; x -1 1 int y = 1; y 1 while(x!=0 || y!=0){
		  
		  x = sc.nextInt();
		  
		  y = sc.nextInt();
		  
		  if(x > y){
			  System.out.println(y+" "+x);
		  }else if (x < y){
			  System.out.println(x+" "+y);
		  }else if(x == y){
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  System.out.println(x+" "+y);
			  }
		  } 
		  
	  } x!=0 || y!=0 x!=0 x 0 y!=0 y 0 {
		  
		  x = sc.nextInt();
		  
		  y = sc.nextInt();
		  
		  if(x > y){
			  System.out.println(y+" "+x);
		  }else if (x < y){
			  System.out.println(x+" "+y);
		  }else if(x == y){
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  System.out.println(x+" "+y);
			  }
		  } 
		  
	  } x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc if(x > y){
			  System.out.println(y+" "+x);
		  }else if (x < y){
			  System.out.println(x+" "+y);
		  }else if(x == y){
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  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){
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  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){
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  System.out.println(x+" "+y);
			  }
		  } x == y x y {
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  System.out.println(x+" "+y);
			  }
		  } if(x==0 && y==0){
				  //何もしない
			  }else{
				  System.out.println(x+" "+y);
			  } x==0 && y==0 x==0 x 0 y==0 y 0 {
				  //何もしない
			  } {
				  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
import java.util.Scanner;

class Main{
  public static void main(String[] args) {
    
	  Scanner sc = new Scanner(System.in);
	  
	  int x = -1;
	  
	  int y = 1;
	  
	  while(x!=0 || y!=0){
		  
		  x = sc.nextInt();
		  
		  y = sc.nextInt();
		  
		  if(x > y){
			  System.out.println(y+" "+x);
		  }else if (x < y){
			  System.out.println(x+" "+y);
		  }else if(x == y){
			  if(x==0 && y==0){
				  //何もしない
			  }else{
				  System.out.println(x+" "+y);
			  }
		  } 
		  
	  }
 

  }
}