#include <bits/stdc++.h>
const int MAX_N = 1e5;
int p[MAX_N + 3];
int d[MAX_N + 3];
int main() {
  std::ios_base::sync_with_stdio(0);
  std::cin.tie(NULL);
  int n, m;
  std::cin >> n >> m;
  std::vector<int> l;
  l.push_back(-1);
  for (int i = 1; i <= m; i++) {
    int x;
    std::cin >> x;
    l.push_back(x);
  }
  for (int i = 1; i <= m; i++) {
    p[i] = i;
    if (p[i] + l[i] - 1 > n) {
      std::cout << "-1\n";
      return 0;
    }
  }
  if (p[m] + l[m] - 1 > n) {
    std::cout << "-1\n";
    return 0;
  }
  if (p[m] + l[m] - 1 != n) {
    p[m] = n - l[m] + 1;
  }
  for (int i = m - 1; i >= 1; i--) {
    if (p[i] + l[i] < p[i + 1]) p[i] = p[i + 1] - l[i];
  }
  if (p[1] > 1) {
    std::cout << "-1\n";
    return 0;
  }
  for (int i = 1; i <= m; i++) std::cout << p[i] << " ";
  std::cout << "\n";
}
