#include <bits/stdc++.h>
using namespace std;
int n, m, a[100013], ans[100013];
long long sum;
int main() {
  while (scanf("%d %d", &n, &m) != EOF) {
    sum = 0;
    int fl = 1;
    for (int i = 1; i <= m; i++) {
      scanf("%d", &a[i]);
      a[i]--;
      sum += a[i] + 1;
      if (a[i] + 1 > n - i + 1) fl = 0;
    }
    if (fl == 0) {
      printf("-1\n");
      continue;
    }
    memset(ans, 0, sizeof(ans));
    if (sum < n) {
      printf("-1\n");
      continue;
    }
    ans[1] = 1, sum -= n;
    int pre = 0;
    if (sum > 0) {
      if (sum >= a[1])
        pre = ans[1], sum -= a[1];
      else
        pre = ans[1] + a[1] - sum, sum = 0;
    } else
      pre = ans[1] + a[1];
    for (int i = 2; i <= m; i++) {
      ans[i] = pre + 1;
      if (sum == 0)
        pre = ans[i] + a[i];
      else if (sum > 0) {
        if (sum >= a[i])
          pre = ans[i], sum -= a[i];
        else
          pre = ans[i] + a[i] - sum, sum = 0;
      }
    }
    for (int i = 1; i <= m; i++) printf("%d ", ans[i]);
    printf("\n");
  }
}
