#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  register long long t = 0;
  register char v = getchar();
  while (v < '0') v = getchar();
  while (v >= '0') t = (t << 3) + (t << 1) + v - 48, v = getchar();
  return t;
}
long long t, n, m, a[200002], sum, k, pos, ans[200002];
signed main() {
  n = read();
  m = read();
  for (register long long i = 1; i <= m; ++i) a[i] = read(), sum += a[i];
  if (sum < n) {
    puts("-1");
    return 0;
  }
  for (register long long i = 1; i <= m; ++i) {
    if (i - 1 + a[i] > n) {
      puts("-1");
      return 0;
    }
  }
  k = n - a[m] + 1;
  for (register long long i = m; i; --i) {
    ans[i] = k;
    sum -= a[i];
    register long long x = max(i - 1, k - a[i - 1]);
    k = x;
  }
  for (register long long i = 1; i <= m; ++i) printf("%d ", ans[i]);
}
