#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, m;
  cin >> n >> m;
  vector<int> lenths(m);
  long long sum = 0;
  for (int i = 0; i < m; i++) {
    cin >> lenths[i];
    sum += lenths[i];
  }
  if ((m - 1 + lenths[m - 1] > n) || (sum < n)) {
    cout << -1 << endl;
    return 0;
  }
  int lastend = 0;
  vector<pair<int, int>> v(m);
  for (int i = 0; i < m; i++) {
    v[i].first = i + 1;
    v[i].second = i + 1 + lenths[i] - 1;
    lastend = max(lastend, v[i].second);
  }
  if (lastend > n) {
    cout << -1 << endl;
    return 0;
  }
  int remain = n - lastend;
  for (int i = 1; i < m; i++) {
    if (remain == 0) break;
    int md = min(v[i - 1].second - v[i].first + 1, remain);
    for (int j = i; j < m; j++) {
      v[j].first += md;
      v[j].second += md;
    }
    remain -= md;
  }
  if (remain > 0) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < v.size(); i++) {
    cout << v[i].first << " ";
  }
  return 0;
}
