#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t n, m;
  cin >> n >> m;
  auto k = n;
  vector<int64_t> L(m);
  copy_n(istream_iterator<int64_t>(cin), m, L.begin());
  vector<int64_t> A(m);
  if (accumulate(L.begin(), L.end(), 0LL) < n) {
    puts("-1");
    return 0;
  }
  for (int i = m - 1; i >= 0; i--) {
    A[i] = min(L[i], k - i);
    k -= A[i];
  }
  assert(k == 0);
  vector<int> ans;
  int r = n;
  for (int i = 0; i < m; i++) {
    r -= i > 0 ? A[i - 1] : 0;
    ans.push_back(r + 1 - L[i]);
  }
  if (*min_element(ans.begin(), ans.end()) <= 0) {
    puts("-1");
    return 0;
  }
  for (int i = 1; i < m; i++)
    assert(ans[i] + L[i] - 1 < ans[i - 1] + L[i - 1] - 1);
  assert(ans[m - 1] == 1);
  assert(*max_element(ans.begin(), ans.end()) <= n);
  copy(ans.begin(), ans.end(), ostream_iterator<int>(cout, " "));
  cout << endl;
}
