object Main {
	def main(A:Array[String]){
		val s = new java.util.Scanner(System.in)
		val n,k=s.nextInt
		val a=(0 to n-1).map(i=>s.nextInt)
		lazy val f= (1 to n).forall(i=>a(i-1)>k+1)
		val m=(1 to n).find(i=>a(i-1)>k+1)
		if(m.isEmpty|| !f)
			println(-1)
		else{
			println(n*(k+1)-1)
			val t = (1 to n).filterNot(i=>i==m.get).mkString(" ")
			for(_<-1 to k)
				print(s"${t} ${m.get} ")
			println(t)
		}
	}
}