#include <bits/stdc++.h>
using namespace std;
void IO() {
  srand(chrono::steady_clock::now().time_since_epoch().count());
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long int n, m;
vector<long long int> arr;
int main() {
  IO();
  cin >> n >> m;
  arr.resize(m);
  long long int sum = 0;
  for (__typeof(m) i = (0) - ((0) > (m)); i != (m) - ((0) > (m));
       i += 1 - 2 * ((0) > (m))) {
    cin >> arr[i];
    sum += arr[i];
  }
  if (sum < n || m > n) {
    cout << -1;
  } else {
    int ok = 1;
    vector<long long int> ans(m);
    for (__typeof(m) i = (0) - ((0) > (m)); i != (m) - ((0) > (m));
         i += 1 - 2 * ((0) > (m))) {
      if (arr[i] + i - 1 >= n) {
        ok = 0;
        break;
      }
      ans[i] = i;
    }
    if (ok) {
      int ind = m - 1;
      int back = n;
      while (back > ans[ind] + arr[ind]) {
        int diff = back - (ans[ind] + arr[ind]);
        back = ans[ind] + diff;
        ans[ind] += diff;
        ind--;
      }
      for (__typeof(m) i = (0) - ((0) > (m)); i != (m) - ((0) > (m));
           i += 1 - 2 * ((0) > (m))) {
        cout << ans[i] + 1 << " ";
      }
    } else {
      cout << -1;
    }
  }
  return 0;
}
