#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  return x * f;
}
const int MAXN = 100010;
struct data {
  int x, id;
} a[MAXN];
inline bool cmp(data a, data b) { return a.x > b.x; }
int N, M;
long long sm;
int L[MAXN], R[MAXN], ans[MAXN];
int main() {
  N = read(), M = read();
  for (int i = 1; i <= M; i++) {
    a[i].x = read();
    sm += (long long)a[i].x;
    a[i].id = i;
  }
  if (sm < N) {
    puts("-1");
    return 0;
  }
  if (M > N) {
    puts("-1");
    return 0;
  }
  int lst = N;
  for (int i = 1; i <= M; i++) {
    L[i] = lst - a[i].x + 1;
    R[i] = lst;
    --lst;
    if (L[i] < 1) {
      puts("-1");
      return 0;
    }
  }
  if (L[M] < 1) {
    puts("-1");
    return 0;
  }
  L[M] = 1;
  R[M] = L[M] + a[M].x - 1;
  for (int i = M - 1; i >= 1; i--)
    if (L[i] > R[i + 1] + 1) {
      L[i] = R[i + 1] + 1;
      R[i] = L[i] + a[i].x - 1;
    } else
      break;
  for (int i = 1; i <= M; i++) ans[a[i].id] = L[i];
  for (int i = 1; i <= M; i++) printf("%d ", ans[i]);
  puts("");
  return 0;
}
