n,k = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
b = Array.new(n){|i|[k+1,a[i],i+1]}.sort
ans = []
while b[-1][0] > 0
    if b[-1][1] == 0
        puts "-1"
        exit
    end
    ans << b[-1][2]
    b[-1][0] -= 1
    b[-1][0] -= 1 if b[-1][0] == b[-2][0]
    b[-1][1] -= 1
    b.sort!
end
puts ans.size,ans.join(" ")