#include <bits/stdc++.h>
using namespace std;
int first[100010], second[100010];
int main() {
  long long int judge = 0;
  int x, y, j, check = -1;
  cin >> x >> y;
  second[y + 1] = 2147483647;
  second[y + 2] = 2147483647;
  for (j = 0; j < y; j++) {
    cin >> first[j + 1];
    check++;
    judge += first[j + 1];
    if (x + 1 < (first[j + 1] + j + 1)) {
      cout << -1;
      check += 2;
      return 0;
    }
  }
  if (x > judge) {
    cout << -1;
    return 0;
  } else
    check -= 1;
  for (j = y; j >= 0; j--) second[j] = min(second[j + 1] - 1, x - first[j] + 1);
  second[1] = 1;
  second[0] = 0;
  for (j = 1; j < y; j++) {
    check += 2;
    if (second[j + 1] <= (second[j] + first[j])) break;
    second[j + 1] = first[j] + second[j];
  }
  for (j = 0; j < y; j++) cout << second[j + 1] << " ";
}
