#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  if (m > n) {
    cout << -1 << endl;
    return 0;
  }
  long long ar[m];
  for (long long &in : ar) {
    cin >> in;
  }
  long long ans[m];
  int pos = n - 1;
  long long sum = 0;
  for (int i = m - 1; i >= 0; i--) {
    if (ar[i] + i > n) {
      cout << -1 << endl;
      return 0;
    }
    ar[i] += sum;
    sum = ar[i];
  }
  if (ar[0] < n) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < m; i++) {
    cout << max(1LL * i + 1, 1LL * n - ar[i] + 1) << " ";
  }
  cout << endl;
}
