#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
long long len[maxn], sum[maxn];
int main() {
  ios::sync_with_stdio(0);
  int m, n;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) cin >> len[i], sum[i] = sum[i - 1] + len[i];
  if (sum[m] < n)
    cout << -1 << endl;
  else {
    int p = 1, q, f = 0;
    for (int i = 1; i <= m; i++) {
      if (len[i] > (n - i + 1)) cout << -1 << endl, exit(0);
    }
    for (int i = 1; i <= m; i++) {
      if (sum[m] - sum[i] < n - p + 1 && !f)
        q = n - p + 1 - (sum[m] - sum[i]), f = 1;
      else if (f == 1)
        q = len[i];
      else
        q = 1;
      cout << p << " ";
      p += q;
    }
    return 0;
  }
}
