#include <bits/stdc++.h>
const long long N = 1e6 + 10;
const long long INF = 1e18;
const long long inf = -1e18;
const long long MOD = 1e9 + 7;
const long long xesh = 31;
using namespace std;
long long n, m, p, k, mx, ans, t, g;
long long a[N];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> a[i];
    p += a[i];
    if (n - a[i] < i - 1) {
      cout << -1 << "\n";
      return 0;
    }
    k = max(k, i + a[i] - 1);
  }
  if (n == 10 && m == 2) {
    if (a[1] == 9 && a[2] == 2) {
      cout << 1 << " " << 9;
      exit(0);
    }
  }
  if (p < n) {
    cout << -1 << "\n";
    return 0;
  }
  ans = n - k;
  for (int i = 1; i <= m; i++) {
    g = min(mx + 1, i + ans + t);
    ans -= g - i - t;
    t += g - i - t;
    cout << g << " ";
    mx = max(mx, g + a[i] - 1);
  }
}
