anchor.diff:      use list_module
       implicit none
   
  -    logical, parameter        :: elim_islands = .true.
  -    logical, parameter        :: one_sol = .true.
  +    type puzzle
  +        character(len=20)        :: name_
  +        type(piece), allocatable :: ps(:)
  +    end type
  +
  +    ! Command line arguments
  +    character(len=80)         :: cmd
  +    logical                   :: elim_islands = .true.
  +    logical                   :: one_sol      = .true.
  +    logical                   :: script_mode  = .false.
  +
       integer, parameter        :: isin(0:3) = (/ 0, 1,  0, -1 /),    &
                                    icos(0:3) = (/ 1, 0, -1,  0 /)
       integer, parameter        :: eye(3, 3) = reshape((/ 1, 0, 0,    &
  
positive.code:                                                      (/ 3, 3 /))
      integer                   :: mrot(3, 3, 3, 4), cube(3, 3, 3), calls
      type(puts_t), allocatable :: puts_cache(:)
      type(piece), allocatable  :: ps(:)
      type(list)                :: sols
      real                      :: t0, t1
  
      call cpu_time(t0)
      call init_mrot(mrot)
      cube = 0
      call read_pieces(ps)
      sols%length = 0
      allocate(sols%d(3, 3, 3, 16))
  
      calls = 1
      call search(ps, size(ps), 1, cube, sols)
      call finish()
  
  contains
  
negative.code:         end do
      end subroutine
  
      subroutine read_puzzle(puzz)
          type(puzzle), intent(out) :: puzz
          integer                   :: n, w, i, j
  
          read *, puzz%name_
          read *, n
          allocate(puzz%ps(n))
  
          do j = 1, n
              read *, w, puzz%ps(j)%cnt
              allocate(puzz%ps(j)%s(3, w))
              do i = 1, 3
                  read *, puzz%ps(j)%s(i, :)
              end do
          end do
      end subroutine
  
      subroutine print_piece(p)
          integer, intent(in) :: p(:, :)
          integer             :: i
  