#include <bits/stdc++.h>
using namespace std;
const int M = 1000000007;
void Solution() {
  long long n, m;
  cin >> n >> m;
  vector<long long> l(m), ans(m);
  for (int i = 0; i < m; i++) {
    cin >> l[i];
    ans[i] = 1;
  }
  ans[m - 1] = l[m - 1];
  long long sum = 0;
  for (int i = 0; i < m; i++) {
    sum += l[i];
  }
  if (sum < n) {
    cout << -1 << "\n";
    return;
  }
  for (int i = 0; i < m; i++) {
    if (l[i] > n - i) {
      cout << -1 << "\n";
      return;
    }
  }
  long long filled = m - 1 + l[(m - 1)];
  long long empty = n - filled;
  long long ptr = m - 1;
  while (empty > 0) {
    if (ans[ptr] < l[ptr]) {
      ++ans[ptr];
      empty--;
    } else {
      ptr--;
    }
  }
  cout << 1 << " ";
  partial_sum(ans.begin(), ans.end(), ans.begin());
  for (int i = 1; i < m; i++) cout << ans[i - 1] + 1 << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tc = 1;
  while (tc--) Solution();
  return 0;
}
