#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<long long> l(m + 1);
  vector<int> ans(m + 1);
  for (int i = (1); i < (m + 1); i++) {
    cin >> l[i];
    ans[i] = i;
    if (l[i] + i - 1 > n) {
      cout << -1 << "\n";
      return 0;
    }
  }
  if ((long long)accumulate(l.begin(), l.end(), 0LL) < n) {
    cout << -1 << "\n";
    return 0;
  }
  int wall = n;
  for (int i = m; i >= 1; i--) {
    if (ans[i] + l[i] - 1 < wall) ans[i] += wall - (ans[i] + l[i] - 1);
    wall = ans[i] - 1;
  }
  for (int i = (1); i < (m + 1); i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
}
