#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long len[100005];
long long suffix[100005];
long long sum;
signed main() {
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) {
    cin >> len[i];
    sum += len[i];
    if (i + len[i] - 1 > n) {
      cout << -1;
      return 0;
    }
  }
  if (sum < n) {
    cout << -1;
    return 0;
  }
  for (long long i = n; i >= 1; i--) suffix[i] = suffix[i + 1] + len[i];
  for (long long i = 1; i <= m; i++) cout << max(i, n - suffix[i] + 1) << ' ';
  return 0;
}
