program knot_puzzle
  implicit none
  integer :: n, i, j
  integer(8) :: l, a(100000), s
  a = 0_8
  read(*,*) n, l
  read(*,*) a(1:n)
  call untie(a(1:n),l,.false.)
  stop
contains
  recursive subroutine untie(a,l,output)
    implicit none
    integer(8), intent(in) :: l, a(:)
    logical :: output
    integer(8) :: s
    integer :: n, i, j
    n = size(a)
    i = 1
    j = n
    s = sum(a)
    if (output) write(*,'(a)') "Possible"
    do while (j.gt.i)
      if (s.lt.l) then
        write(*,'(a)') "Impossible"
        return
      end if
      if (a(i).lt.a(j)) then
        if (output) write(*,'(i0)') i
        s = s-a(i)
        i = i+1
      else
        if (output) write(*,'(i0)') j-1
        s = s-a(j)
        j = j-1
      end if
    end do
    if (.not.output) call untie(a,l,.true.)
    return
  end subroutine untie
end program knot_puzzle