#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int n, m;
  cin >> n >> m;
  vector<long long int> l(m), s(m + 1, 0);
  for (long long int i = 0; i < m; i++) {
    cin >> l[i];
    if (i + l[i] > n) {
      cout << -1;
      cout << "\n";
      return 0;
    }
  }
  for (long long int i = m - 1; i >= 0; i--) s[i] = s[i + 1] + l[i];
  if (s[0] < n) {
    cout << -1;
    cout << "\n";
    return 0;
  }
  for (long long int i = 1; i <= m; i++)
    cout << max(i, n - s[i - 1] + 1) << " ";
  cout << "\n";
  return 0;
}
