#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  long long int m;
  cin >> m;
  long long int arr[m];
  for (long long int i = 0; i < m; i++) cin >> arr[i];
  long long int sum = 0;
  for (long long int i = 0; i < m; i++) sum += arr[i];
  if (sum < n) {
    cout << -1 << endl;
    return 0;
  }
  for (long long int i = 0; i < m; i++) {
    if (arr[i] + i - 1 >= n) {
      cout << -1 << endl;
      return 0;
    }
  }
  vector<long long int> ans;
  for (long long int i = 0; i < m; i++) {
    long long int num = max(i + 1, n - sum + 1);
    ans.push_back(num);
    sum -= arr[i];
  }
  for (long long int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
