#include <bits/stdc++.h>
using namespace std;
template <class L, class R>
ostream& operator<<(ostream& cout, pair<L, R> P) {
  return cout << '(' << P.first << ',' << P.second << ')';
}
template <class T>
ostream& operator<<(ostream& cout, vector<T> V) {
  cout << "[ ";
  for (auto v : V) cout << v << ' ';
  return cout << ']';
}
std::vector<long long> inp;
bool cmp(long long a, long long b) { return inp[a] > inp[b]; }
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  inp.resize(m);
  long long sum = 0;
  for (long long i = 0; i < m; ++i) {
    cin >> inp[i];
    sum += inp[i];
  }
  if (sum < n) {
    cout << -1 << "\n";
    return 0;
    ;
  }
  vector<long long> vec(m);
  iota(vec.begin(), vec.end(), 0);
  sort(vec.begin(), vec.end());
  vector<long long> ans(m);
  for (long long i = 1; i <= m; ++i) {
    ans[i - 1] = i;
    if (i + inp[i - 1] - 1 <= n) {
      continue;
    } else {
      cout << -1;
      return 0;
    }
  }
  long long pres = n;
  for (long long i = m - 1; i > 0; --i) {
    if ((i + 1) <= pres - inp[i] + 1) {
      ans[i] = pres - inp[i] + 1;
      pres = ans[i] - 1;
    } else {
      break;
    }
  }
  for (auto it : ans) {
    cout << it << ' ';
  }
  return 0;
}
