#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, m;
  cin >> n >> m;
  vector<long long> l(m);
  for (long long i = 0; i < m; ++i) cin >> l[i];
  vector<long long> ans(m);
  for (long long i = 0; i < m; ++i) {
    ans[i] = i + 1;
    if (ans[i] + l[i] - 1 > n) {
      cout << -1 << endl;
      return 0;
    }
  }
  ans[m - 1] = n - (l[m - 1] - 1);
  for (long long i = m - 2; i > -1; --i) {
    ans[i] = max(ans[i], ans[i + 1] - l[i]);
  }
  if (ans[0] != 1) {
    cout << -1 << endl;
    return 0;
  }
  for (long long i = 0; i < m; ++i) cout << ans[i] << " ";
  cout << endl;
}
