#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, u = 0;
  cin >> n >> m;
  int P[m], A[m];
  for (int i = 0; i < m; i++) {
    cin >> P[i];
    u += P[i];
  }
  int minimum = 0;
  for (int i = m - 1; i >= 0; i--) {
    minimum = max(minimum + 1, P[i]);
    A[i] = minimum;
  }
  if (u < n) {
    cout << "-1";
    return 0;
  }
  if (u == n) {
    int temp = 1;
    for (int i = 0; i < m; i++) {
      cout << temp << " ";
      temp = temp + P[i];
    }
    return 0;
  }
  int flag = 1;
  for (int i = 0; i < m; i++) {
    if (P[i] <= n - i)
      ;
    else
      flag = 0;
  }
  if (flag == 0) {
    cout << "-1";
    return 0;
  }
  int sum = A[0];
  int j = 0;
  int rem = n;
  while (sum < rem) {
    cout << rem - P[j] + 1 << " ";
    rem = rem - P[j];
    j++;
    sum = A[j];
  }
  for (int i = 1; i <= m - j; i++) {
    cout << i << " ";
  }
}
