#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  cin >> n >> m;
  long long int a[m], u = 0, sum = 0;
  for (long long int i = 0; i < m; i++) {
    cin >> a[i];
    if (a[i] > n - i) u++;
    sum += a[i];
  }
  if (u || sum < n)
    cout << "-1\n";
  else {
    long long int i = 0;
    while (sum > n) {
      long long int k = min(a[i] - 1, sum - n);
      a[i] -= k;
      sum -= k;
      i++;
    }
    long long int h = 1;
    for (i = 0; i < m; i++) {
      cout << h << " ";
      h += a[i];
    }
    cout << endl;
  }
}
