#include <bits/stdc++.h>
using namespace std;
int m, n;
int l[100010];
int main() {
  cin >> n >> m;
  for (int i = 0; i < (int)(m); i++) cin >> l[i];
  int rem = n - l[m - 1];
  vector<int> p;
  p.push_back(n - l[m - 1] + 1);
  int cur = n - l[m - 1] + 1;
  bool ok = true;
  for (int i = (m - 2); i >= 0; i--) {
    if ((n - l[i]) < i) {
      ok = false;
      break;
    }
    if (rem < (i + 1)) {
      ok = false;
      break;
    }
    if (rem == (i + 1)) {
      rem--;
      cur--;
      p.push_back(cur);
    } else {
      int d = rem - i;
      if (d > l[i]) {
        rem -= l[i];
        cur -= l[i];
        p.push_back(cur);
      } else {
        rem -= d;
        cur -= d;
        p.push_back(cur);
      }
    }
  }
  if (ok and p[m - 1] != 1) ok = false;
  if (!ok)
    cout << "-1" << endl;
  else {
    reverse(p.begin(), p.end());
    for (int i = 0; i < (int)(m - 1); i++) cout << p[i] << " ";
    cout << p[m - 1] << endl;
  }
  return 0;
}
