#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  vector<long long> l(m);
  for (auto& li : l) cin >> li;
  long long sum = 0;
  for (int i = 0; i < m; i++) {
    if (l[i] + i > n) {
      cout << "-1\n";
      return 0;
    }
    sum += l[i];
  }
  if (sum < n) {
    cout << "-1\n";
    return 0;
  }
  vector<long long> ans(m);
  long long next = 1;
  for (int i = 0; i < m; i++) {
    ans[i] = next;
    next = next + 1;
    sum -= (l[i] - 1);
    if (sum < n) {
      next += (n - sum);
      sum = n;
    }
  }
  for (auto ai : ans) cout << ai << " ";
  cout << "\n";
  return 0;
}
