#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int INF = 0x3f3f3f3f;
const long long INF_LL = 0x3f3f3f3f3f3f3f3f;
int p[N];
int l[N], r[N];
int len[N];
int main() {
  ios::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  int sum = 0;
  len[0] = 1;
  for (int i = 1; i <= m; i++) {
    cin >> len[i];
    l[i] = l[i - 1] + 1;
    r[i] = min(r[i - 1] + len[i - 1], n - len[i] + 1);
    if (l[i] > r[i]) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (l[m] + len[m] - 1 <= n && n <= r[m] + len[m] - 1) {
    p[m] = n - len[m] + 1;
    for (int i = m - 1; i >= 1; i--) {
      p[i] = min(p[i + 1] - 1, r[i]);
    }
    for (int i = 1; i <= m; i++) cout << p[i] << " \n"[i == m];
  } else {
    cout << -1 << endl;
  }
  return 0;
}
