#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  cin >> n >> m;
  vector<long long> l(m);
  vector<long long> lSuff(m);
  for (int i = 0; i < m; i++) {
    cin >> l[i];
  }
  for (int i = m - 1; i >= 0; i--) {
    lSuff[i] = l[i];
    if (i != m - 1) {
      lSuff[i] += lSuff[i + 1];
    }
  }
  if (lSuff[0] < n) {
    cout << "-1";
    return;
  }
  for (int i = 0; i < m; i++) {
    if (l[i] + i > n) {
      cout << "-1";
      return;
    }
  }
  vector<long long> ans(m);
  ans[0] = 1;
  ans[m - 1] = n - l[m - 1] + 1;
  for (int i = 1; i < m - 1; i++) {
    ans[i] = max(i + 1LL, n - lSuff[i] + 1);
  }
  for (auto it : ans) cout << it << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) solve();
  return 0;
}
