#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int l[m];
  long long int sum = 0;
  int p[m];
  int flag = 1;
  long long int cumsum[m + 1];
  for (int i = 0; i < m; i++) {
    cin >> l[i];
    sum = sum + l[i];
    if (l[i] + i > n) {
      flag = 0;
    }
  }
  if (sum < n) {
    flag = 0;
  }
  int pointer = 1;
  int iter = 0;
  if (flag == 1) {
    cumsum[m] = 0;
    for (int i = m - 1; i >= 0; i--) {
      cumsum[i] = cumsum[i + 1] + l[i];
    }
    for (int i = m - 1; i >= 0; i--) {
      p[i] = max(n - cumsum[i] + 1, (long long)i + 1);
    }
    for (int i = 0; i < m; i++) {
      cout << p[i] << " ";
    }
  } else {
    cout << "-1";
  }
}
