#include <bits/stdc++.h>
using namespace std;
int a[100005];
long long sum[100005];
int main() {
  int n, k;
  cin >> n >> k;
  int ok = 0;
  long long all = 0;
  for (int i = 1; i <= k; i++) {
    cin >> a[i];
    all += a[i];
    if (i > n - a[i] + 1) {
      ok = 1;
    }
  }
  for (int i = k; i >= 1; i--) {
    sum[i] = sum[i + 1] + a[i];
  }
  if (ok || all < n) {
    cout << -1 << endl;
    return 0;
  }
  for (long long i = 1; i <= k; i++) {
    cout << max(i, n - sum[i] + 1) << " ";
  }
}
