#include <bits/stdc++.h>
long long n, m;
long long l[100009], sum[100009];
int main() {
  long long amount;
  scanf("%lld%lld", &n, &m);
  amount = 0;
  for (long long i = 1; i <= m; i++) {
    scanf("%lld", &l[i]);
    amount += l[i];
  }
  if (amount < n) {
    printf("-1\n");
    return (0);
  }
  for (long long i = 1; i <= m; i++) {
    if (n - l[i] < i - 1) {
      printf("-1\n");
      return (0);
    }
  }
  for (long long i = m; i >= 1; i--) {
    sum[i] = sum[i + 1] + l[i];
  }
  for (long long i = 1; i <= m; i++) {
    long long p1 = i;
    long long p2 = n - sum[i] + 1;
    if (p1 > p2)
      printf("%lld ", p1);
    else
      printf("%lld ", p2);
  }
  return 0;
}
