#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int MD = 1e9 + 7;
vector<int> L, pos;
int n, m;
long long sum = 0;
void fin() {
  printf("-1");
  exit(0);
}
int main() {
  int t = 1;
  while (t--) {
    scanf("%d%d", &n, &m);
    L.resize(m);
    pos.resize(m);
    for (int i = 0; i < m; i++) {
      scanf("%d", &L[i]);
      sum += (long long)L[i];
    }
    if (sum < (long long)n) fin();
    for (int i = 0; i < m; i++) {
      pos[i] = n - i - L[i] + 1;
      if (pos[i] < 1) fin();
    }
    int last = 1;
    for (int i = m - 1; i >= 0; i--) {
      if (pos[i] > last) pos[i] = last;
      last = pos[i] + L[i];
    }
    if (last != n + 1) fin();
    for (int i = 0; i < m; i++) printf("%d ", pos[i]);
  }
  return 0;
}
