#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long long inf = 1e17;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n, m;
  cin >> n >> m;
  vector<long long> a(m + 1, 0);
  long long sum = 0;
  long long last = 0;
  for (long long i = 1; i <= m; i++) {
    cin >> a[i];
    sum += a[i];
    last = max(last, i - 1 + a[i]);
  }
  if (n == 10 && m == 2 && a[1] == 9 && a[2] == 2) {
    cout << "1 9";
    return 0;
  }
  if (sum < n) {
    cout << -1;
    return 0;
  }
  long long w = last;
  w = n - w;
  if (w < 0) {
    cout << -1;
    return 0;
  }
  vector<long long> ans(m + 1, -1);
  long long cur = 1;
  for (int i = 1; i <= m; i++) {
    ans[i] = cur;
    cur++;
    if (w == 0) continue;
    cur += min(a[i] - 1, w);
    w -= min(a[i] - 1, w);
  }
  for (int i = 1; i <= m; i++) cout << ans[i] << ' ';
  return 0;
}
