#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long arr[100005], ans[100005];
int main() {
  long long i, x, sum;
  scanf("%lld %lld", &n, &m);
  sum = 0;
  for (i = 1; i <= m; i++) {
    scanf("%lld", &arr[i]);
    sum += arr[i];
  }
  if (sum < n) return !printf("-1\n");
  x = 0;
  for (i = 1; i <= m; i++) {
    ans[i] = x + 1;
    if (x + arr[i] > n) return !printf("-1\n");
    sum -= arr[i];
    x = max(x + 1, n - sum);
  }
  for (i = 1; i <= m; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
