#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
int mox[8] = {1, 0, 0, -1, 1, -1, 1, -1};
int moy[8] = {0, -1, 1, 0, -1, -1, 1, 1};
char mover[4] = {'D', 'L', 'R', 'U'};
const long long MOD = 998244353;
const long long MOD2 = 1000000009;
const long long INF = (1LL << 61);
const int inf = (int)2e9 + 3;
using namespace std;
void solve();
int myrand() {
  return (abs(rand() << 16) | (rand() >> 16)) ^
         (abs(rand() << 16) | (rand() >> 16));
}
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(30);
  srand((unsigned)time(NULL));
  int t;
  t = 1;
  while (t--) {
    solve();
  }
}
const int N = 100005;
const int MAGIC = (int)sqrt(N + .0);
const int lg = 100;
int l[N], p[N];
void solve() {
  int n, m;
  cin >> n >> m;
  long long s = 0;
  for (int i = 1; i <= m; ++i) {
    cin >> l[i];
    if (n - l[i] < i - 1) return void(cout << -1 << endl);
    s += l[i];
  }
  if (s < n) return void(cout << -1 << endl);
  for (int i = 1; i <= m; ++i) {
    if (s - l[i] + 1 >= n) {
      p[i] = i;
      s = s - l[i] + 1;
    } else {
      p[i] = i;
      break;
    }
  }
  for (int i = m, j = n; i > 0 && p[i] == 0; --i) {
    p[i] = j - l[i] + 1;
    j -= l[i];
  }
  for (int i = 1; i <= m; ++i) {
    cout << p[i] << ' ';
  }
  cout << endl;
}
