#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-10;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const int maxn = 100005;
int n, m;
int l[maxn], a[maxn];
int main(void) {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) scanf("%d", &l[i]);
  int r = 0;
  for (int i = m; i >= 1; i--) {
    a[i] = max(r + 1 - l[i] + 1, 1);
    r = a[i] + l[i] - 1;
  }
  if (r > n) {
    puts("-1");
    return 0;
  }
  if (n - r) {
    int le = n, flag = 0;
    for (int i = 1; i <= m; i++) {
      int tr = a[i] + l[i] - 1;
      if (tr >= le) {
        flag = 1;
        break;
      }
      a[i] += le - tr;
      le = a[i] - 1;
    }
    if (!flag) {
      puts("-1");
      return 0;
    }
  }
  for (int i = 1; i <= m; i++) printf("%d ", a[i]);
  puts("");
  return 0;
}
