#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const int INF = 1e9 + 7;
int L[N];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int n, m, i, l = 1, p, z, q;
  long long x, s = 0;
  bool e = false;
  cin >> n >> m;
  for (i = 1; i <= m; i++) {
    cin >> L[i], s += L[i];
    if (L[i] > (n - i + 1)) e = true;
  }
  if (e || s < n) {
    cout << "-1\n";
    return 0;
  }
  x = s - n;
  cout << 1 << ' ';
  l = L[1];
  for (i = 2; i <= m; i++) {
    z = min(l - 1, L[i]);
    if (z <= x) {
      if (l - z <= 1)
        l = L[i];
      else
        l--;
      x -= z;
      cout << i << ' ';
    } else {
      p = i + l - 1 - x;
      cout << p << ' ';
      p += L[i];
      for (i++; i <= m; i++) cout << p << ' ', p += L[i];
      break;
    }
  }
  return 0;
}
