#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> arr(m), ans(m);
  long long sum = 0;
  for (int i = 0; i < m; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  if (sum < n) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < m; i++) {
    ans[i] = i + 1;
    if (ans[i] + arr[i] - 1 > n) {
      cout << -1;
      return 0;
    }
  }
  int pos = n;
  for (int i = m - 1; i >= 0; i--) {
    while (ans[i] + arr[i] - 1 < pos) ++ans[i];
    pos = ans[i] - 1;
  }
  for (auto x : ans) {
    cout << x << " ";
  }
}
