#include <bits/stdc++.h>
using namespace std;
long long a[100005], i, n, m, s, p[100005], mx[100005];
signed main() {
  cin >> n >> m;
  for (i = 1; i <= m; ++i) cin >> a[i];
  for (i = m; i; --i) s += a[i], mx[i] = max(mx[i + 1] + 1, a[i]);
  for (i = 1; i <= m; ++i)
    if (mx[i] + i - 1 > n) {
      cout << -1;
      return 0;
    }
  if (s < n) {
    cout << "-1";
    return 0;
  }
  p[1] = 1;
  for (i = 2; i <= m; ++i) {
    p[i] = min(p[i - 1] + a[i - 1], n - mx[i] + 1);
  }
  for (i = 1; i <= m; ++i) cout << p[i] << " ";
}
