#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  long long n, m;
  cin >> n >> m;
  vector<long long> a(m);
  long long sum = 0;
  for (long long i = 0; i < (m); ++i) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum < n) {
    cout << -1;
    return 0;
  }
  vector<long long> ans(m);
  for (long long i = 1; i <= m; ++i) {
    ans[i - 1] = i;
    if ((i + a[i - 1] - 1) > n) {
      cout << -1;
      return 0;
    }
  }
  long long pos_needed = n;
  for (long long i = m; i >= 1; --i) {
    while ((ans[i - 1] + a[i - 1] - 1) < pos_needed) ++ans[i - 1];
    pos_needed = ans[i - 1] - 1;
  }
  for (auto x : ans) {
    cout << x << ' ';
  }
}
