#include <bits/stdc++.h>
using namespace std;
long long n, m, l[100005], k[100005], sum, p[100005];
struct node {
  long long len, id;
} a[100005];
bool cmp(node i, node j) { return i.len > j.len; }
signed main() {
  cin >> n >> m;
  for (long long i = 1; i <= m; i++)
    cin >> l[i], sum += l[i], a[i].len = l[i], a[i].id = i;
  if (sum < n) {
    cout << -1 << endl;
    return 0;
  }
  long long now = 0;
  for (long long i = m; i >= 1; i--) k[i] = k[i + 1] + a[i].len;
  for (long long i = 1; i <= m; i++) {
    if (i + a[i].len - 1 > n) {
      cout << -1 << endl;
      return 0;
    }
    if (k[i] + i - 1 >= n)
      p[a[i].id] = i;
    else {
      p[a[i].id] = n - k[i] + 1;
    }
  }
  for (long long i = 1; i <= m; i++) cout << p[i] << ' ';
  cout << endl;
}
