#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  register long long x = 0;
  register bool f = 0;
  register char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + c - 48;
    c = getchar();
  }
  return f ? -x : x;
}
char cr[200];
long long tt;
inline void print(register long long x, register char k = '\n') {
  if (!x) putchar('0');
  if (x < 0) putchar('-'), x = -x;
  while (x) cr[++tt] = x % 10 + '0', x /= 10;
  while (tt) putchar(cr[tt--]);
  putchar(k);
}
const long long maxn = 114514;
long long a[maxn], s[maxn], n, m, p[maxn], sum;
signed main() {
  n = read();
  m = read();
  for (long long i = 1; i <= m; i++) {
    a[i] = read();
    p[i] = i;
    if (p[i] + a[i] - 1 > n) {
      print(-1);
      return 0;
    }
    sum += a[i];
  }
  if (sum < n) {
    print(-1);
    return 0;
  }
  sum = 0;
  for (long long i = m; i; i--) {
    sum += a[i];
    p[i] = n - sum + 1;
    if (p[i] < i) p[i] = i;
  }
  for (long long i = 1; i <= m; i++) {
    print(p[i], ' ');
  }
}
