#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
template <typename T>
void read(T &x) {
  x = 0;
  char ch = getchar();
  long long f = 1;
  while (!isdigit(ch)) {
    if (ch == '-') f *= -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  x *= f;
}
long long len[110000];
int r[110000];
long long sum[110000];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &len[i]);
    r[i] = n - len[i] + 1;
  }
  for (int i = m; i >= 1; i--) {
    sum[i] = sum[i + 1] + len[i];
  }
  if (sum[1] < n) {
    cout << -1 << endl;
    return 0;
  }
  long long ma = 1;
  queue<long long> ex;
  for (int i = 1; i <= m; i++) {
    if (len[i] > n - i + 1) {
      cout << -1 << endl;
      return 0;
    }
    ex.push(min(n - i + 1 - len[i] + 1, sum[i + 1] + 1));
  }
  while (!ex.empty()) {
    cout << ex.front() << " ";
    ex.pop();
  }
  return 0;
}
