#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> l(m);
  for (int i = 0; i < m; i++) {
    cin >> l[i];
  }
  int end = n;
  vector<int> p(m, 0);
  for (int i = m - 1; i >= 0; i--) {
    int start = max(i, end - l[i]);
    if (start + l[i] > n or start >= end) {
      end = n;
      break;
    }
    end = start;
    p[i] = start + 1;
  }
  if (end != 0) {
    cout << "-1\n";
  } else {
    for (int p_i : p) {
      cout << p_i << " ";
    }
    cout << "\n";
  }
}
