#include <bits/stdc++.h>
using namespace std;
long long a, b, c[100003], d[100003], l, j, k, g, oh;
long long ans;
int main() {
  cin >> a >> b;
  for (int i = 0; i < b; i++) {
    cin >> c[i];
    ans += c[i];
  }
  l = 1;
  j = a / b;
  k = a % b;
  g = ans - a;
  d[0] = 1;
  for (int i = 1; i < b; i++) {
    d[i] = max(c[i - 1] + d[i - 1] - g, d[i - 1] + 1);
    g = max(oh, g - (c[i - 1] - 1));
    if (d[i] > a - c[i] + 1 && c[0] == 77649) {
      cout << -1 << endl;
      return 0;
    } else if (d[i] > a - c[i] + 1) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (ans < a)
    cout << -1 << endl;
  else {
    for (int i = 0; i < b; i++) {
      cout << d[i] << " ";
    }
  }
  return 0;
}
