#include <bits/stdc++.h>
using namespace std;
namespace io {
const int l = 1 << 20;
char buf[l], *s, *t, c;
inline void gc() {
  if (s == t) {
    t = (s = buf) + fread(buf, 1, l, stdin);
    c = s == t ? EOF : *s++;
  } else
    c = *s++;
}
template <class IT>
inline void gi(IT &x) {
  x = 0;
  gc();
  while (c < '0' || c > '9') gc();
  while ('0' <= c && c <= '9') {
    x = (x << 1) + (x << 3) + (c ^ 48);
    gc();
  }
}
char buf0[20];
int a;
template <class IT>
inline void pi(IT x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  do buf0[++a] = x % 10 + 48;
  while (x /= 10);
  while (a) putchar(buf0[a--]);
  putchar('\n');
}
};  // namespace io
using io::gi;
using io::pi;
template <class IT>
inline void cmax(IT &a, IT b) {
  if (a < b) a = b;
}
template <class IT>
inline void cmin(IT &a, IT b) {
  if (b < a) a = b;
}
const int N = 100005;
int a[N], s[N];
int main() {
  int n, m, i, b = 0, c = 0, la;
  scanf("%d%d", &n, &m);
  la = n;
  for (i = (1); i <= (m); ++i) {
    scanf("%d", &a[i]);
    cmin(b += a[i], n);
  }
  if (b < n) {
    printf("-1");
    return 0;
  }
  for (i = (1); i <= (m); ++i) cmax(c, a[i] + i - 1);
  if (c > n) {
    printf("-1");
    return 0;
  }
  for (i = (m); i >= (1); --i) {
    cmax(la, i - 1 + a[i]);
    s[i] = la - a[i] + 1;
    la -= a[i];
  }
  for (i = (1); i <= (m); ++i) printf("%d ", s[i]);
  return 0;
}
