#include <bits/stdc++.h>
int S[100000];
int main() {
  int n, m;
  std::cin >> n >> m;
  long long s = 0;
  int f = 1, l[100000];
  for (int i = 0; i < m; i++) std::cin >> l[i], s += l[i];
  for (int i = 1; i < m; i++)
    if (l[i] > n - i) f = 0;
  if (s < n) f = 0;
  if (!f) std::cout << -1 << std::endl, exit(0);
  S[m - 1] = l[m - 1];
  for (int i = m - 2; i >= 0; i--) S[i] = std::max(S[i + 1] + 1, l[i]);
  int x = 0;
  std::vector<int> val;
  val.clear();
  for (int i = 0; i < m; i++) {
    int lav = std::min(x + 1, n - S[i] + 1);
    val.push_back(lav);
    x = std::max(x, lav + l[i] - 1);
  }
  std::cout << val[0];
  for (int i = 1; i < m; i++) std::cout << ' ' << val[i];
  std::cout << std::endl;
  exit(0);
}
