#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  vector<long long> arr;
  for (int i = 0; i < m; i++) {
    long long temp;
    cin >> temp;
    arr.push_back(temp);
  }
  long long chosen_block = 1;
  vector<int> ans_arr(n, -1);
  for (int i = 0; i < m; i++) {
    if ((chosen_block - 1 + arr[i] - 1) < n) {
      ans_arr[i] = chosen_block;
    } else {
      cout << -1 << endl;
      exit(0);
    }
    chosen_block++;
  }
  long long sum_minus_one_covered = 0;
  for (int i = 0; i < m; i++) {
    sum_minus_one_covered += arr[i];
  }
  vector<long long> activate(m, 0);
  if (sum_minus_one_covered >= n) {
    long long covering = n - m;
    int j = m - 1;
    while (covering > 0) {
      covering -= (arr[j] - 1);
      activate[j] = arr[j] - 1;
      j--;
    }
    j++;
    activate[j] += covering;
    long long off = 0;
    long long flag = false;
    for (int i = 0; i < m; i++) {
      if (flag) {
        ans_arr[i] += off;
        off += activate[i];
      }
      if (activate[i] != 0 && flag == false) {
        flag = true;
        off = activate[i];
      }
    }
    for (int i = 0; i < m; i++) {
      cout << ans_arr[i] << " ";
    }
    cout << endl;
  } else {
    cout << -1 << endl;
  }
  return 0;
}
