#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char c = getchar();
  int x = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
const int MOD = 998244353;
const double eps = 1e-6;
const int INF = 0x3f3f3f3f;
const long long INFLL = 1e18;
template <typename T>
T gcd(T a, T b) {
  return (a % b == 0) ? b : gcd(b, a % b);
}
template <typename T>
inline T lowbit(T x) {
  return x & -x;
}
template <typename T>
inline T _max(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
inline T _min(T a, T b) {
  return a < b ? a : b;
}
long long kuai(long long b, long long p, long long mod) {
  long long now = b, ans = 0;
  while (p) {
    if (p % 2 == 0)
      now = now * now % mod;
    else {
      if (ans == 0) ans = 1;
      ans = ans * now % mod;
      now = now * now % mod;
    }
    p /= 2;
  }
  return ans % mod;
}
long long inv(long long x) { return kuai(x, MOD - 2, MOD); }
const int dir[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int M = 3e2 + 5;
const int N = 1e5 + 10;
int inp[N], ans[N];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  long long tot = 0;
  int flag = 1;
  for (int i = (1); i <= (m); i++) {
    scanf("%d", &inp[i]);
    tot += inp[i];
    if (i - 1 + inp[i] > n) flag = 0;
  }
  if (tot < n) flag = 0;
  if (flag == 0) {
    printf("-1\n");
    return 0;
  }
  int pre = n + 1;
  for (int i = m; i >= 1; i--) {
    pre = max(pre - inp[i], i);
    ans[i] = pre;
  }
  for (int i = (1); i <= (m); i++) {
    if (i != 1) printf(" ");
    printf("%d", ans[i]);
  }
  printf("\n");
  return 0;
}
