#include <bits/stdc++.h>
using namespace std;
long long n, m, a[100005], tot = 0, tmp;
int main() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) {
    cin >> a[i];
    if (i + a[i] - 1 > n) {
      cout << -1 << endl;
      return 0;
    }
    tot += a[i];
  }
  if (tot < n) {
    cout << -1 << endl;
    return 0;
  }
  cout << 1;
  tot -= a[1];
  n--;
  for (long long i = 2; i <= m; i++) {
    if (tot > n) {
      cout << " " << i;
      tot -= a[i];
      n--;
    } else {
      cout << " " << i + n - tot;
      tmp = i + n - tot + a[i];
      for (long long j = i + 1; j <= m; j++) {
        cout << " " << tmp;
        tmp += a[j];
      }
      cout << endl;
      return 0;
    }
  }
  cout << endl;
}
