#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> a(m);
  long long tot = 0;
  for (int i = 0; i < m; ++i) {
    cin >> a[i];
    tot += a[i];
  }
  if (tot < n) {
    cout << -1 << endl;
    return 0;
  }
  vector<int> pos(m);
  for (int i = 0; i < m; ++i) pos[i] = i + 1;
  for (int i = 0; i < m; ++i)
    if (pos[i] + a[i] - 1 > n) {
      cout << -1 << endl;
      return 0;
    }
  pos[m - 1] = n - a[m - 1] + 1;
  for (int i = m - 2; i >= 0; --i) {
    if (pos[i] + a[i] - 1 >= pos[i + 1] - 1) continue;
    pos[i] += (pos[i + 1] - 1) - (pos[i] + a[i] - 1);
  }
  for (int i : pos) cout << i << " ";
  return 0;
}
