#include <bits/stdc++.h>
using namespace std;
int n, m, l[100007], suma[100007], p[100007], ost, czy;
long long mod = 1000000007;
string s, s1, s2;
long long potega(long long base, long long pot);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> l[i];
  }
  for (int i = m; i > 0; i--) suma[i] = min(1000000007, suma[i + 1] + l[i]);
  ost = 1;
  for (int i = 1; i <= m; i++) {
    p[i] = max(ost, n - suma[i] + 1);
    if (p[i] + l[i] - 1 > n) czy = 1;
    ost = p[i] + 1;
  }
  if (czy == 1 || p[1] != 1 || p[m] + l[m] - 1 != n) {
    cout << "-1";
    return 0;
  }
  for (int i = 1; i <= m; i++) cout << p[i] << " ";
  return 0;
}
long long potega(long long base, long long pot) {
  if (pot == 1) return base;
  if (pot % 2 == 0) {
    long long pom = potega(base, pot / 2);
    pom *= pom;
    pom %= mod;
    return pom;
  } else {
    long long pom = potega(base, pot - 1);
    pom *= base;
    pom %= mod;
    return pom;
  }
}
