#include <bits/stdc++.h>
const long long md = (1e9 + 7);
const long long fakmd = 998244353;
using namespace std;
long long n, m;
pair<long long, long long> a[100100];
long long ans[100100];
int32_t main() {
  cin >> n >> m;
  long long it = 1;
  long long sum = 0;
  for (long long i = 1; i <= m; i++) {
    cin >> a[i].first;
    sum += a[i].first;
    a[i].second = i;
  }
  if (sum < n) {
    return cout << -1, 0;
  }
  for (long long i = 1; i <= m; i++) {
    sum -= a[i].first;
    long long ln = max((n - it + 1) - sum, 1ll);
    if (ln > a[i].first || it + a[i].first - 1 > n) {
      return cout << -1, 0;
    }
    ans[a[i].second] = it;
    it += ln;
  }
  if (it < n) {
    cout << -1;
  } else {
    for (long long i = 1; i <= m; i++) {
      cout << ans[i] << " ";
    }
  }
  return 0;
}
