#include <bits/stdc++.h>
using namespace std;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  long long n, m;
  cin >> n >> m;
  vector<long long> a(m);
  for (long long i = (0); i < (m); ++i) cin >> a[i];
  for (long long i = (0); i < (m); ++i) {
    if (a[i] + i > n) {
      return cout << -1 << '\n', 0;
    }
  }
  vector<long long> suf(m);
  suf[m - 1] = a[m - 1];
  for (long long i = m - 2; i >= 0; --i) {
    suf[i] = a[i] + suf[i + 1];
  }
  if (suf[0] < n) return cout << -1 << '\n', 0;
  vector<long long> ans(m);
  iota(begin(ans), end(ans), 1);
  long long end = n;
  for (long long i = m - 1; i >= 0; --i) {
    if (ans[i] + a[i] - 1 < end) ans[i] += end - (ans[i] + a[i] - 1);
    ckmin(end, ans[i] - 1);
  }
  for (auto& k : ans) cout << k << ' ';
  cout << '\n';
}
