#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, M, flag = 0, sum = 0;
  cin >> N >> M;
  long long arr[M + 1], suff[M + 1];
  for (long long i = 1; i <= M; i++) {
    cin >> arr[i];
    sum += arr[i];
    if (arr[i] > N - i + 1) flag = 1;
  }
  suff[M] = arr[M];
  if (sum < N || flag) {
    cout << -1;
    return 0;
  }
  for (long long i = M - 1; i >= 1; i--) suff[i] = suff[i + 1] + arr[i];
  for (long long i = 1; i <= M; i++) cout << max(i, N - suff[i] + 1) << " ";
}
