#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  long long a[100005];
  long long ans[100005] = {0};
  long long sum = 0;
  int flag = 0;
  for (long long i = 1; i <= m; ++i) {
    cin >> a[i];
    sum += a[i];
    if (a[i] > n - i + 1) {
      flag = 1;
    }
  }
  if (flag) {
    cout << -1;
    return 0;
  }
  if (sum < n) {
    cout << -1;
    return 0;
  }
  for (int i = m; i >= 1; --i) {
    ans[i] = ans[i + 1] + a[i];
  }
  for (int i = 1; i <= m; ++i) {
    cout << max((long long)i, n - ans[i] + 1) << ' ';
  }
  return 0;
}
