#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  cin >> n >> m;
  vector<int> l(m);
  for (int i = 0; i < n; ++i) cin >> l[i];
  vector<int> p(m);
  p[m - 1] = l[m - 1];
  for (int i = m - 2; i >= 0; --i) {
    p[i] = max(l[i], p[i + 1] + 1);
  }
  if (p[0] > n) {
    cout << -1 << "\n";
    return 0;
  }
  int en = n;
  for (int i = 0; i < m; ++i) {
    if (p[i] < en) {
      p[i] = en;
      en = en - l[i];
    } else {
      en = 0;
      break;
    }
  }
  if (en > 0) {
    cout << -1 << "\n";
    return 0;
  }
  for (int i = 0; i < m; ++i) cout << p[i] - l[i] + 1 << " ";
  cout << "\n";
  return 0;
}
