#include <bits/stdc++.h>
using namespace std;
long long int n, m, cases, t, ans;
string s, s2, s3;
long long int ar[(int)(1e6 + 10)], ar2[(int)(1e6 + 10)], cum[(int)(1e6 + 10)];
void brainfuck();
int main() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(NULL);
  cout.tie(NULL);
  brainfuck();
  return 0;
}
void brainfuck() {
  cin >> n >> m;
  long long int sum = 0;
  int marker = 0;
  for (int i = 1; i <= m; i++) {
    cin >> ar[i];
    cum[i] = cum[i - 1] + ar[i];
    if (ar[i] + i - 1 > n) marker = 1;
  }
  if (cum[m] < n || marker) {
    cout << "-1";
    return;
  }
  int pre = n;
  ar2[m] = n - ar[m] + 1;
  for (long long int i = m - 1; i >= 1; i--) {
    ar2[i] = max(min(cum[i - 1] + 1, min(pre - ar[i + 1], pre - ar[i])), i);
    pre = ar2[i] + ar[i] - 1;
    if (ar2[i] < 1) {
      cout << "-1";
      return;
    }
  }
  for (int i = 1; i <= m; i++) cout << ar2[i] << " ";
}
