#include <bits/stdc++.h>
const int maxn = 2e5 + 5;
using namespace std;
long long a[maxn];
long long ans[maxn];
signed main() {
  long long n, m, sum = 0;
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) cin >> a[i], sum += a[i];
  if (sum < n) {
    cout << -1 << endl;
    return 0;
  }
  for (long long i = 1; i <= m; i++) {
    if (a[i] > (n - i + 1)) return cout << -1 << '\n', 0;
    ans[i] = i;
  }
  long long now = n;
  for (long long i = m; i >= 1; i--) {
    if (now - a[i] + 1 <= i) {
      ans[i] = i;
      break;
    }
    ans[i] = now - a[i] + 1;
    now -= a[i];
  }
  for (long long i = 1; i <= m; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
