#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  int L[100005];
  long long total = 0;
  for (int i = 1; i <= m; i++) {
    cin >> L[i];
    total += L[i];
  }
  if (total < n) {
    cout << -1;
    return 0;
  }
  int extend = 0;
  int pos[100005];
  for (int i = 1; i <= m; i++) {
    pos[i] = i;
    extend = max(extend, i + L[i] - 1);
  }
  if (extend > n) {
    cout << -1;
    return 0;
  }
  int buffer = 0;
  for (int i = 1; i <= m; i++) {
    pos[i] += buffer;
    int whitespace = n - extend;
    if (whitespace) {
      if (L[i] - 1 >= whitespace) {
        buffer += whitespace;
        extend += whitespace;
      } else if (L[i] - 1 < whitespace) {
        extend += L[i] - 1;
        buffer += L[i] - 1;
      }
    }
  }
  if (extend < n) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i <= m; i++) cout << pos[i] << " ";
  return 0;
}
