#include <bits/stdc++.h>
using namespace std;
int z[300005];
int ans[300005];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, k;
  cin >> n >> k;
  long long sum = 0;
  int fl = 0;
  for (int i = 1; i <= k; ++i) {
    cin >> z[i];
    sum += z[i];
    if (z[i] > n - i + 1) fl = 1;
  }
  int R = n;
  if (sum < n || fl == 1)
    cout << -1 << endl;
  else {
    for (int i = 1; i <= k; ++i) {
      ans[i] = i;
    }
    for (int i = k; i >= 1; --i) {
      if (ans[i] + z[i] - 1 < R) {
        ans[i] += R - (ans[i] + z[i] - 1);
        R = ans[i] - 1;
      } else {
        break;
      }
    }
    for (int i = 1; i <= k; ++i) {
      cout << ans[i] << " ";
    }
    cout << endl;
  }
}
