#include <bits/stdc++.h>
using namespace std;
void get_color(vector<long long>& v, long long st, long long en, long long m) {
  for (long long i = st; i <= en; i++) {
    v[i] = m;
  }
  return;
}
void print(vector<long long>& v, long long n) {
  for (long long i = 1; i <= n; i++) {
    cout << v[i] << " ";
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m, s = 0;
  cin >> n >> m;
  vector<long long> v(m);
  bool cnd = false;
  for (long long i = 0; i < m; i++) {
    cin >> v[i];
    s += v[i];
    if (v[i] + i > n) {
      cnd = true;
    }
  }
  if (cnd) {
    cout << -1;
    return 0;
  }
  if (s < n) {
    cout << -1;
    return 0;
  }
  vector<pair<long long, long long> > ans(m);
  long long maxl = 0, prevl = -1;
  for (long long i = 0; i < m; i++) {
    ans[i].first = i;
    ans[i].second = ans[i].first + v[i] - 1;
    prevl = ans[i].second;
  }
  vector<long long> maxlen(m), len(m);
  for (long long i = m - 1; i >= 0; i--) {
    maxlen[i] = max(maxl, ans[i].second);
    maxl = maxlen[i];
  }
  long long en = maxl, j = 1, shift = 0;
  while (en < (n - 1) && j < n) {
    long long val =
        min(n - 1 - (maxlen[j] + shift), ans[j - 1].second + 1 - ans[j].first);
    len[j] = val;
    shift += val;
    en = max(en, maxlen[j] + shift);
    j++;
  }
  long long prev = 0;
  vector<long long> color(2 * n);
  for (long long i = 0; i < m; i++) {
    cout << (ans[i].first + 1 + len[i] + prev) << " ";
    prev += len[i];
  }
  return 0;
}
