#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e5 + 5, inf = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  long long int ary[m];
  long long int sum = 0;
  vector<pair<long long int, long long int> > v;
  for (long long int i = 0; i < m; ++i) {
    cin >> ary[i];
    sum += ary[i];
    v.push_back(make_pair(ary[i], i));
  }
  if (sum < n) {
    cout << -1 << "\n";
  } else {
    long long int ans[n];
    long long int f = 0, c = 0;
    for (long long int i = 0; i < m; ++i) {
      if (c + v[i].first > n) {
        f = 1;
      }
      c++;
    }
    if (f == 1) {
      cout << -1 << "\n";
      return 0;
    }
    long long int cur = 0;
    for (long long int i = 0; i < m; ++i) {
      if (cur + sum - 1 < n - 1) {
        long long int d = n - 1 - cur - sum + 1;
        cur = cur + d;
        ans[v[i].second] = cur;
        sum -= v[i].first;
        cur++;
      } else {
        ans[v[i].second] = cur;
        cur++;
        sum -= v[i].first;
      }
    }
    for (long long int i = 0; i < m; ++i) {
      cout << ans[i] + 1 << " ";
    }
    cout << "\n";
  }
  return 0;
}
