#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0L);
const long double EPS = 1e-12L;
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
namespace task {
const int N = 100000;
int n, m, r;
int a[N];
int p[N];
int main() {
  cin >> n >> m;
  r = n;
  for (int i = 0; i < m; ++i) {
    cin >> a[i];
  }
  bool ok = true;
  for (int i = m - 1; ok && i >= 0; --i) {
    int t = max(r - a[i], i);
    if (t > n - a[i]) {
      ok = false;
      break;
    }
    p[i] = t;
    r = t;
  }
  if (ok && r == 0) {
    for (int i = 0; i < m; ++i) {
      cout << p[i] + 1 << ' ';
    }
    cout << '\n';
  } else {
    cout << -1 << '\n';
  }
  return 0;
}
}  // namespace task
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(11);
  cout.setf(ios::fixed);
  return task::main();
}
