#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long md = 1000000007) {
  long long res = 1;
  x %= md;
  while (y) {
    if (y & 1) res = (res * x) % md;
    x *= x;
    if (x >= md) x %= md;
    y >>= 1;
  }
  return res;
}
struct node {
  vector<long long> v, w;
};
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, m, second = 0;
  cin >> n >> m;
  vector<long long> v(m);
  vector<long long> ans(m, -1);
  for (long long i = 0; i < m; i++) cin >> v[i], second += v[i];
  if (second < n) {
    cout << -1;
    return 0;
  }
  long long cur = n;
  long long dp[m + 1];
  dp[m] = 0;
  dp[m - 1] = v[m - 1];
  for (long long i = m - 2; i >= 0; i--) {
    dp[i] = max(v[i], dp[i + 1] + 1);
  }
  if (dp[0] <= n) {
    for (long long i = 0; i < m; i++) ans[i] = i + 1;
    long long req = n - dp[0];
    long long cur = 0;
    for (long long i = 0; i < m; i++) {
      long long us = min(v[i] - 1, req);
      if (i != m - 1) us = min(us, n - dp[i + 1] - 1 - i - cur);
      ans[i] += cur;
      cur += us;
      req -= us;
    }
    for (auto x : ans) cout << x << " ";
    return 0;
  }
  cout << -1;
}
