#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
long long x, n, m, sum, p[maxn], c[maxn], t, jav, ans[maxn], a[maxn];
bool ch;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    cin >> a[i];
    sum += a[i];
  }
  x = sum - n;
  if (x < 0) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < m; i++)
    if (n - a[i] + 1 < i + 1) {
      cout << -1 << endl;
      return 0;
    }
  jav = 1;
  long long i = 0;
  for (int i = 0; i < n || x > 0; i++) {
    if (x > 0) {
      t = a[i];
      a[i] = max((long long)1, a[i] - x);
      x -= (t - a[i]);
    }
    ans[i] = jav;
    jav += a[i];
  }
  for (int i = 0; i < m; i++) cout << ans[i] << " ";
  return 0;
}
