#include <bits/stdc++.h>
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  long long s = 0;
  cin >> n >> m;
  vector<int> a(m + 1);
  for (int i = 1; i <= m; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) s += a[i];
  for (int i = 1; i <= m; i++)
    if (i + a[i] > n + 1) return (cout << -1), 0;
  if (s < n) return (cout << -1), 0;
  vector<int> ans(m + 1);
  ans[m] = n - a[m] + 1;
  for (int i = m - 1; i >= 1; i--) ans[i] = min(n - a[i] + 1, ans[i + 1] - 1);
  ans[1] = 1;
  for (int i = 2; i <= m; i++) ans[i] = min(ans[i], ans[i - 1] + a[i - 1]);
  for (int i = 1; i <= m; i++) cout << ans[i] << ' ';
  return 0;
}
