#include <bits/stdc++.h>
using namespace std;
mt19937 rnd;
const int N = 1e5 + 10;
int l[N];
long long suf[N];
int p[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> l[i];
  }
  for (int i = m; i >= 1; i--) {
    suf[i] = suf[i + 1] + l[i];
  }
  for (int i = 1; i <= m; i++) {
    if (l[i] > n - i + 1) {
      cout << "-1\n";
      return 0;
    }
    p[i] = i;
  }
  if (suf[1] < n) {
    cout << "-1\n";
    return 0;
  }
  for (int i = m; i >= 1; i--) {
    if (suf[i] >= n - i + 1) {
      int ptr = n + 1;
      for (int j = m; j >= i + 1; j--) {
        ptr -= l[j];
        p[j] = ptr;
      }
      break;
    }
  }
  for (int i = 1; i <= m; i++) {
    cout << p[i] << " ";
  }
  cout << "\n";
  return 0;
}
