using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace WTF19OPENA
{
    public partial class Program
    {
        void Solve(StreamScanner ss, StreamWriter sw)
        {
            //---------------------------------
            var N = ss.Next(int.Parse);
            var K = ss.Next(int.Parse);
            var A = ss.Next(int.Parse, N);

            var boxes = A.Select((a, i) => new Box(i + 1, a)).ToArray();
            var ends = new List<int>();

            if (boxes.Any(box => box.Count < (K + 1) - (K + 1) / 2))
            {
                sw.WriteLine(-1);
                return;
            }

            foreach (var box in boxes.OrderBy(b => b.Count))
            {
                var repeat = Enumerable.Repeat(box.Index, Math.Max(0, K + 1 - box.Count));
                ends.AddRange(repeat);
            }

            if (ends.Count > K)
            {
                sw.WriteLine(-1);
                return;
            }

			ends.AddRange(Enumerable.Repeat(0, K - ends.Count));

            var e1 = ends.Take((K + 1) / 2).ToArray();
            var e2 = ends.Skip((K + 1) / 2).ToArray();
            var alEnds = new List<int>();

            for (var i = 0; i < K / 2; i++)
            {
                alEnds.Add(e1[i]);
				alEnds.Add(e2[i]);
            }

			if (K % 2 == 1) alEnds.Add(e1.Last());

			var seq = new List<int>(Enumerable.Range(1, N));
			var ans = new List<int>();

            Func<int, bool> isExist = i => 0 <= i && i < alEnds.Count;

            for (var i = 0; i < K + 1; i++)
            {
                if (isExist(i)) seq.Remove(alEnds[i]);
				if (isExist(i - 1)) seq.Insert(0, alEnds[i - 1]);
                //sw.WriteLine(string.Join(" ", seq));
				ans.AddRange(seq.Where(x => x != 0));
            }

            sw.WriteLine(ans.Count);
            sw.WriteLine(string.Join(" ", ans));
            //---------------------------------
        }
    }

    public struct Box
    {
		public int Index { get; }
		public int Count { get; }

        public Box(int index, int count)
        {
            Index = index;
            Count = count;
        }
    }

    public class StreamScanner
    {
        static readonly char[] Separator = { ' ' };
        readonly StreamReader streamReader;

        string[] line = new string[0];
        int index = 0;

        public StreamScanner(Stream stream)
        {
            this.streamReader = new StreamReader(stream);
        }

        public string Next()
        {
            return Next(s => s);
        }

        public string[] Next(int x)
        {
            return Next(s => s, x);
        }

        public string[][] Next(int x, int y)
        {
            return Next(s => s, x, y);
        }

        public T Next<T>(Func<string, T> parser)
        {
            if (index < line.Length) return parser(line[index++]);
            index = 0;
            line = streamReader.ReadLine()?.Split(Separator, StringSplitOptions.RemoveEmptyEntries);
            return Next(parser);
        }

        public T[] Next<T>(Func<string, T> parser, int x)
        {
            var ret = new T[x];
            for (var i = 0; i < x; ++i) ret[i] = Next(parser);
            return ret;
        }

        public T[][] Next<T>(Func<string, T> parser, int x, int y)
        {
            var ret = new T[y][];
            for (var i = 0; i < y; ++i) ret[i] = Next(parser, x);
            return ret;
        }
    }

    public partial class Program
    {
        static void Main()
        {
            Excute(Console.OpenStandardInput(), Console.OpenStandardOutput());
        }

        public static void Excute(Stream input, Stream output)
        {
            var ss = new StreamScanner(input);
            var sw = new StreamWriter(output);
            new Program().Solve(ss, sw);
            sw.Flush();
        }
    }
}

Measured memory_bytes: 13664