#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
int main() {
  int n;
  scanf("%d", &n);
  int m;
  scanf("%d", &m);
  vector<pair<int, int> > vp(m);
  long long sum = 0;
  for (int i = 0; i < m; i++) {
    scanf("%d", &vp[i].first);
    vp[i].second = i;
    sum += vp[i].first;
  }
  pair<int, int> pr = vp.back();
  if ((pr.first + m - 1 > n) or sum < n) {
    printf("%d\n", -1);
    return 0;
  }
  int done = n + 1;
  int ans[m], flag = 0;
  for (int i = m - 1; i >= 0; i--) {
    if (vp[i].first + i + 1 >= done) {
      done = i + 1;
      ans[vp[i].second] = i + 1;
    } else {
      int st = done - vp[i].first;
      done = st;
      ans[vp[i].second] = st;
    }
    if (done + vp[i].first - 1 > n) flag = 1;
  }
  if (flag) {
    printf("%d\n", -1);
    return 0;
  }
  for (int i = 0; i < m; i++) cout << ans[i] << ' ';
  cout << endl;
}
