using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Competitive
{
    internal class Solution
    {
        public int N, K;
        public int[] A;
        public long MOD = 1000000007;

        public void Run()
        {
            {
                var line = Input.ReadIntArray();
                N = line[0];
                K = line[1];
            }
            A = Input.ReadIntArray();

            for (int i = 0; i < N; i++)
            {
                A[i] -= (K + 1);
            }

            // 最後に訪れる箱
            List<int> lastVisits = new List<int>();

            // K回だけ省略することができる、ただし前と同じものは選べない
            {
                int last = -1;
                for (int k = 0; k < K; k++)
                {
                    int least = 0;
                    int leastind = -1;
                    for (int i = 0; i < N; i++)
                    {
                        if (A[i] < least && i != last)
                        {
                            least = A[i];
                            leastind = i;
                        }
                    }

                    lastVisits.Add(leastind);
                    last = leastind;
                    if (leastind != -1)
                        A[leastind]++;
                }

            }

            // 失敗
            if (A.Count(v => v < 0) > 0)
            {
                Console.WriteLine(-1);
                return;
            }

            // 成功
            List<int> Visits = new List<int>();
            {
                int last = -1;
                for (int k = 0; k <= K; k++)
                {
                    int lv = k == K ? -1 : lastVisits[k];
                    for (int i = 0; i < N; i++)
                    {
                        if (i != lv && i != last) Visits.Add(i);
                    }

                    if (lv != -1) Visits.Add(lv);
                    last = lv;
                }
            }

            Console.WriteLine(Visits.Count);
            Console.WriteLine(string.Join(" ", Visits.Select(v => v + 1).ToList()));
        }
    }

    // libs ----------
    

    // common ----------

    internal static class Input
    {
        public static string ReadString()
        {
            string line = Console.ReadLine();
            return line;
        }

        public static int ReadInt()
        {
            string line = Console.ReadLine();
            return int.Parse(line);
        }

        public static int[] ReadIntArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(int.Parse).ToArray();            
        }

        public static long ReadLong()
        {
            string line = Console.ReadLine();
            return long.Parse(line);
        }

        public static long[] ReadLongArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(long.Parse).ToArray();
        }

        public static double[] ReadDoubleArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(double.Parse).ToArray();
        }
    }
    
    internal class Program
    {
        public static void Main(string[] args)
        {
            var s = new Solution();
            s.Run();
        }
    }
}

Measured memory_bytes: 13524