#include <bits/stdc++.h>
using namespace std;
long long a[200010], b[200010];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) cin >> a[i];
  int pos = n + 1;
  for (long long i = m; i >= 1; --i) {
    int k = max(pos - a[i], i);
    if (k < i || k > n - a[i] + 1) {
      cout << "-1";
      return 0;
    }
    b[i] = k;
    pos = k;
  }
  if (pos > 1) {
    cout << "-1";
    return 0;
  }
  for (int i = 1; i <= m; ++i) cout << b[i] << " ";
  return 0;
}
