#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll arr[101010];
ll m, n;
ll k = 1;
ll sum = 0;
ll fr[101010];
int main() {
  scanf("%lld%lld", &m, &n);
  for (ll i = 0; i < n; i++) {
    scanf("%lld", arr + i);
    if (i + arr[i] > m) {
      puts("-1");
      return 0;
    }
    sum += arr[i];
  }
  if (sum < m) {
    puts("-1");
    return 0;
  }
  for (ll i = 0; i < n; i++) fr[i] = i + 1;
  fr[n] = m + 1;
  for (ll i = n - 1; i >= 0; i--) fr[i] = max(fr[i], fr[i + 1] - arr[i]);
  for (ll i = 0; i < n; i++) printf("%lld ", fr[i]);
}
