#include <bits/stdc++.h>
using namespace std;
int n, m;
int l[100005];
long long sum[100005];
int ans[100005];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> l[i];
    sum[i] = sum[i - 1] + l[i];
  }
  if (sum[m] < n) {
    cout << -1 << endl;
    return 0;
  }
  int pre = n;
  ans[1] = n - l[1] + 1;
  for (int i = 2; i <= m; i++) {
    long long t = sum[m] - sum[i] + 1;
    long long t2 = pre - l[i];
    long long t3 = pre - l[i - 1] - l[i] + 1;
    if (t3 > t2 || t3 > t) {
      cout << -1 << endl;
      return 0;
    }
    ans[i] = min(t, t2);
    if (ans[i] < 1) {
      cout << -1;
      return 0;
    }
    pre = ans[i] + l[i] - 1;
  }
  for (int i = 1; i <= m; i++) cout << ans[i] << ' ';
  return 0;
}
