#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int main() {
  long long l[N], r[N] = {0}, n, m, sum = 0;
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) {
    cin >> l[i];
    sum += l[i];
    if (l[i] > n - i + 1) {
      puts("-1");
      return 0;
    }
  }
  if (sum < n) {
    puts("-1");
    return 0;
  }
  for (long long i = m; i >= 1; i--) r[i] = l[i] + r[i + 1];
  for (long long i = 1; i <= m; i++) {
    cout << max(i, n - r[i] + 1) << " ";
  }
  return 0;
}
