#include <bits/stdc++.h>
using namespace std;
template <class T>
void show(const vector<T> &a) {
  for (T x : a) cout << x << " ";
  cout << '\n';
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng_64(chrono::steady_clock::now().time_since_epoch().count());
vector<long long> xx = {1, 0, -1, 0};
vector<long long> yy = {0, 1, 0, -1};
string dir = "LRUD";
const long long N = 3e5 + 50, oo = 2e9 + 500;
const long long mod = 998244353;
const long long M2 = 1000000093, x2 = 27162;
const long long M1 = 1000000087, x1 = 241;
const double eps = 1e-12, PI = 2 * acos(0.0);
long long n, m, k;
long long cnt = 0;
long long lg = 18;
vector<vector<long long> > g;
vector<vector<long long> > rg;
vector<long long> visit(N, 0);
signed main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cin >> n >> m;
  vector<long long> l(m);
  long long mx = 0;
  for (long long i = 0; i < m; i++) {
    cin >> l[i];
    mx = max(mx, l[i] + i);
    ;
    cnt += l[i];
  }
  if (cnt < n || mx > n) {
    return cout << -1, 0;
  }
  vector<long long> st(m);
  st[0] = 1;
  cnt = 0;
  vector<long long> suf(m);
  for (long long i = m - 1; i >= 0; i--) {
    suf[i] = i + l[i];
    if (i != m - 1) {
      suf[i] = max(suf[i], suf[i + 1]);
      ;
    }
  }
  for (long long i = 1; i < m; i++) {
    st[i] = i + 1 + cnt;
    long long prev_r = st[i - 1] + l[i - 1] - 1;
    long long end = suf[i];
    end += cnt;
    long long move = min(n - end, prev_r - st[i] + 1);
    st[i] += move;
    cnt += move;
  }
  show(st);
}
