#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
const int N = 100005;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int l[N];
  int smax[N];
  for (int i = 0; i < m; i++) {
    scanf("%d", l + i);
    if (l[i] > n - i) {
      printf("-1\n");
      return 0;
    }
  }
  smax[m - 1] = l[m - 1] + m - 1;
  for (int i = m - 2; i >= 0; i--) {
    smax[i] = max(l[i] + i, smax[i + 1]);
  }
  vector<int> ans;
  int id = 1;
  int p = 0;
  for (int i = 0; i < m; i++) {
    while (p >= id && smax[i] - i < n - id + 1) {
      id++;
    }
    if (smax[i] - i > n - id + 1) {
      id--;
    }
    if (ans.size() && id == ans.back()) {
      printf("-1\n");
      return 0;
    }
    ans.push_back(id);
    p = max(p, id + l[i] - 1);
  }
  if (p < n) {
    printf("-1\n");
    return 0;
  }
  for (int i : ans) {
    printf("%d ", i);
  }
  printf("\n");
  return 0;
}
