#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long t = 1;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    long long b[m + 1], sum[m + 1];
    vector<pair<long long, long long> > v;
    for (long long i = 1; i <= m; i++) {
      cin >> b[i];
      if (b[i] + i - 1 > n) {
        cout << "-1";
        return 0;
      }
    }
    sum[m] = b[m];
    for (long long i = m - 1; i > 0; i--) sum[i] = sum[i + 1] + b[i];
    if (sum[1] < n) {
      cout << "-1";
      return 0;
    }
    long long a[m + 1];
    for (long long i = m; i >= 1; i--) {
      a[i] = max(i, n - sum[i] + 1);
    }
    for (long long i = 1; i <= m; i++) cout << a[i] << " ";
  }
}
