#include <bits/stdc++.h>
using namespace std;
long long n, m, a[100009], b[100009], sum, ans[100009];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> a[i];
    sum += a[i];
    if (a[i] + i - 1 > n) {
      cout << "-1";
      return 0;
    }
  }
  if (sum < n) {
    cout << "-1";
    return 0;
  }
  b[m + 1] = 999999999;
  for (int i = m; i >= 1; i--) {
    b[i] = min(n - a[i] + 1, b[i + 1] - 1);
  }
  b[1] = 1;
  for (int i = 2; i <= m; i++) {
    if (b[i - 1] + a[i - 1] >= b[i]) break;
    b[i] = b[i - 1] + a[i - 1];
  }
  for (int i = 1; i <= m; i++) cout << b[i] << " ";
  return 0;
}
