#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
int ans[MAXN], ans1[MAXN];
int a[MAXN];
int main() {
  int n, m;
  long long sum = 0;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  if (sum < n)
    printf("-1\n");
  else {
    int l = inf;
    for (int i = m; i >= 1; i--) {
      l = min(l, n - a[i] + 1);
      ans[i] = l;
      l--;
    }
    if (l < 0)
      printf("-1\n");
    else {
      l = 1;
      for (int i = 1; i <= m; i++) {
        l = min(l, ans[i]);
        ans1[i] = l;
        l = l + a[i];
      }
      for (int i = 1; i <= m; i++) printf("%d%c", ans1[i], i == m ? '\n' : ' ');
    }
  }
  return 0;
}
