#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << '\n';
  err(++it, args...);
}
const long long inf = 1e18L + 5;
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long testcases = 1;
  while (testcases--) {
    long long n, m;
    cin >> n >> m;
    std::vector<long long> l(m);
    long long sum = 0;
    bool flag = false;
    for (long long i = 0; i < m; ++i) {
      cin >> l[i];
      sum += l[i];
      if (l[i] > n - i) {
        flag = true;
      }
    }
    if (m > n or sum < n or flag) {
      cout << -1 << '\n';
      return 0;
    }
    std::vector<long long> suffixSum(m + 1, 0);
    for (long long i = m - 1; i >= 0; --i) {
      suffixSum[i] = suffixSum[i + 1] + l[i];
    }
    long long idx = 0;
    for (long long i = 0; i < m; ++i) {
      while (idx + suffixSum[i] < n) {
        idx++;
      }
      cout << idx + 1 << " ";
      idx++;
    }
    cout << '\n';
  }
  return 0;
}
