#include <bits/stdc++.h>
using namespace std;
int cansel_sync = (ios::sync_with_stdio(0), cin.tie(0), 0);
const int N = 200010;
const double err = 1e-11;
const int inf = ~0u >> 2;
const long long INF = ~0ull >> 2;
long long read() {
  long long x;
  if (scanf("%lld", &x) == -1) exit(0);
  return x;
}
const double pi = acos(-1.0);
double readf() {
  double x;
  if (scanf("%lf", &x) == -1) exit(0);
  return x;
}
template <typename T>
T sqr(const T &x) {
  return x * x;
}
template <typename A, typename B>
ostream &operator<<(ostream &o, const pair<A, B> &x) {
  return o << '(' << x.first << ',' << x.second << ')';
}
const int mod = (1 ? 1000000007 : 998244353);
long long mul(long long a, long long b, long long m = mod) { return a * b % m; }
long long qpow(long long a, long long b, long long m = mod) {
  long long ans = 1;
  for (; b; a = mul(a, a, m), b >>= 1)
    if (b & 1) ans = mul(ans, a, m);
  return ans;
}
long long getinv(long long v, long long m = mod) { return qpow(v, m - 2, m); }
long long n, m, a[N], b[N], ans[N], s;
signed main() {
  cin >> n >> m;
  for (long long i = (0), _ = (m); i < _; i++) {
    cin >> a[i];
    b[i] = a[i] + i;
    s += a[i];
  }
  long long p = max_element(b, b + n) - b;
  long long Max = b[p];
  if (Max > n || s < n) cout << -1 << endl, exit(0);
  ans[p] = n - a[p] + 1;
  for (long long i = (p + 1), _ = (m); i < _; i++) ans[i] = ans[p] + i - p;
  s = 1;
  long long rest = n - m - a[n - 1];
  for (long long i = (0), _ = (p); i < _; i++) {
    ans[i] = s;
    s += a[i];
  }
  for (long long i = (p)-1, _ = (0); i >= _; i--) {
    if (ans[i] < ans[i + 1]) break;
    ans[i] = ans[i + 1] - 1;
  }
  for (long long i = (0), _ = (m); i < _; i++) cout << ans[i] << ' ';
  return 0;
}
