#include <bits/stdc++.h>
using namespace std;
template <typename T, typename V>
ostream &operator<<(ostream &os, const pair<T, V> pai) {
  return os << '(' << pai.first << ' ' << pai.second << ')';
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> v) {
  cout << '[';
  for (auto p : v) cout << p << ",";
  cout << "]";
  return os;
}
template <typename T, typename V>
ostream &operator<<(ostream &os, const set<T, V> v) {
  cout << "{";
  for (auto p : v) cout << p << ",";
  cout << "}";
  return os;
}
template <typename T, typename V>
ostream &operator<<(ostream &os, const map<T, V> v) {
  cout << "{";
  for (auto p : v) cout << p << ",";
  cout << "}";
  return os;
}
template <typename T>
void get_max(T &a, T b) {
  a = max(a, b);
}
template <typename T>
void get_min(T &a, T b) {
  a = min(a, b);
}
const int MAXN = 2e5 + 10;
long long n, m;
long long A[MAXN];
long long S[MAXN];
void print_no() {
  cout << -1;
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n >> m;
  for (int i = 0, _i = (m); i < _i; i++) {
    cin >> A[i];
    S[i] = A[i];
    if (A[i] + i > n) print_no();
  }
  for (int i = (m)-1, _i = (0); i >= _i; i--) S[i] += S[i + 1];
  0;
  if (S[0] < n) print_no();
  long long pos = 0;
  for (int i = 0, _i = (m); i < _i; i++) {
    pos = max(pos + 1, n - S[i] + 1);
    cout << pos << ' ';
  }
  return 0;
}
