#include <bits/stdc++.h>
using namespace std;
long long modpow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans = (ans * a) % 1000000007;
    }
    a = (a * a) % 1000000007;
    b = b / 2;
  }
  return ans;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int m, n;
  cin >> n >> m;
  vector<int> inp(m);
  long long sum = 0;
  int mx = 0;
  for (int i = 0; i < m; i++) {
    cin >> inp[i];
    sum += inp[i];
    mx = max(mx, i + inp[i] - 1);
  }
  if (sum < n) {
    cout << -1 << endl;
    return 0;
  }
  int fl = 0;
  for (int i = 0; i < m; i++) {
    if (i + inp[i] > n) {
      fl = 1;
      break;
    }
  }
  if (fl) {
    cout << -1 << endl;
    return 0;
  }
  int rem = n - 1 - mx;
  int st = 1;
  for (int i = 0; i < m; i++) {
    cout << st << " ";
    int extra = inp[i] - 1;
    if (rem > extra) {
      rem -= extra;
      st += (extra + 1);
    } else if (rem > 0) {
      st += (rem + 1);
      rem = 0;
    } else {
      st++;
    }
  }
  cout << endl;
}
