#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) {
      res = res * a;
    }
    a = a * a;
    b >>= 1;
  }
  return res % mod;
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
void solve() {
  long long n, m, sum = 0;
  cin >> n >> m;
  vector<long long> v(m), r(m + 1), ans(m);
  for (long long i = 0; i < m; i++) {
    cin >> v[i];
    sum += v[i];
  }
  if (sum < n || sum > n * (n + 1) / 2) {
    cout << -1 << endl;
    return;
  }
  for (long long i = m - 1; i >= 0; i--) {
    r[i] = r[i + 1] + v[i];
  }
  long long start = 0, maxp = 1;
  for (long long i = 0; i < m; i++) {
    if (v[i] > n - i) {
      cout << -1 << endl;
      return;
    }
    start = max(start + 1, n - r[i + 1] - v[i] + 1);
    if (start > maxp + 1) {
      cout << -1 << endl;
      return;
    }
    maxp = max(maxp, start + v[i] - 1);
    ans[i] = start;
  }
  for (long long i = 0; i < m; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
