#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const long long int N = 1e5 + 5;
void Hariiih() {
  long long int n, m;
  cin >> n >> m;
  long long int sum = 0;
  vector<long long int> a(m);
  for (long long int i = 0; i < m; ++i) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum - n < 0) {
    cout << -1 << '\n';
    return;
  }
  vector<long long int> ans;
  long long int p = m - 1, olp = sum - n;
  long long int idx = n - a[p] + 1;
  if (idx < 1) {
    cout << -1 << '\n';
    return;
  }
  ans.push_back(idx);
  for (long long int i = p - 1; i >= 0; i--) {
    if (olp == 0) {
      idx -= a[i];
      ans.push_back(idx);
    } else {
      long long int t = min({olp, n - idx + 1, a[i] - 1});
      olp -= t;
      idx -= (a[i] - t);
      ans.push_back(idx);
    }
    if (idx < 1) {
      cout << -1 << '\n';
      return;
    }
  }
  for (long long int i = 0; i < m; i++) {
    cout << ans.back() << " ";
    ans.pop_back();
  }
  return;
}
signed main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) Hariiih();
  return 0;
}
