program test
integer :: n,k,a(100),i,a_min,nk(10000)


read(*,*) n,k
read(*,*) (a(i),i=1,n)

a_min = minval(a(1:n))

do i=1,10000
	nk(i) = mod(i-1,n)+1
enddo

if(a_min <= k) then
	write(*,*) -1
else
	write(*,*) n*(k+1)
	write(*,*) (nk(i),i=1,n*(k+1))
endif

end program