#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, m;
long long tot = 0;
int ans[N];
int e[N];
void print() {
  for (int i = 1; i <= m; i++) {
    printf("%d ", ans[i]);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &e[i]);
    if (i + e[i] - 1 <= n)
      ans[i] = i;
    else {
      printf("-1");
      return 0;
    }
  }
  if (e[m] + ans[m] - 1 > n) {
    printf("-1");
    return 0;
  }
  if (e[m] + ans[m] - 1 == n) {
    print();
    return 0;
  }
  int nowp = n;
  for (int i = m; i >= 1; i--) {
    if (ans[i] + e[i] - 1 < nowp) {
      ans[i] = nowp - e[i] + 1;
      nowp = ans[i] - 1;
    } else
      nowp = ans[i] - 1;
  }
  if (nowp != 0) {
    printf("-1");
    return 0;
  }
  print();
  return 0;
}
