#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  long long arr[m + 1];
  long long left[m + 1], right[m + 1];
  for (long long i = 1; i <= m; i++) {
    cin >> arr[i];
  }
  long long res = 0;
  for (long long i = 1; i <= m; i++) {
    res += arr[i];
  }
  long long ans = 0;
  for (long long i = 1; i <= m; i++) {
    long long path = n - i + 1;
    if (arr[i] > path) {
      ans = 1;
    }
  }
  if (res < n || ans) {
    puts("-1");
  } else {
    ans = 0;
    for (long long i = 1; i < m; i++) {
      res = i + arr[i] - 1;
      left[i] = i;
      right[i] = res;
      ans = max(ans, res);
    }
    left[m] = n - arr[m] + 1;
    long long null = left[m] - ans - 1;
    if (null > 0) {
      long long yes = 0;
      for (long long i = m - 1; i > 1; i--) {
        if (right[i] <= right[i - 1]) {
          long long d = right[i - 1] - right[i];
          left[i] += d;
        }
        while ((left[i] - right[i + 1]) <= 1 && (left[i + 1] - right[i]) >= 1) {
          null = null - 1;
          left[i] += 1;
          right[i] += 1;
          if (!null) {
            yes = 1;
            break;
          }
        }
        if (yes) break;
      }
    }
    for (long long i = 1; i <= m; i++) {
      cout << left[i] << " ";
    }
  }
  return 0;
}
