#include <bits/stdc++.h>
using namespace std;
const int Max = 1e5 + 2;
const long long int MOD = 1e9 + 7;
long long int power(int x, int y) {
  int temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int Ceil(long long int a, long long int b) {
  if (a % b) return (a / b) + 1;
  return a / b;
}
int n, m, t;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> arr(m + 1, 0);
  long long int sum = 0;
  for (long long int i = 1; i < m + 1; i++) cin >> arr[i], sum += arr[i];
  if (sum < n) {
    puts("-1");
    return 0;
  }
  for (int i = 1; i <= m; i++) {
    if (n - arr[i] < i - 1) {
      puts("-1");
      return 0;
    }
  }
  vector<long long int> s(m + 2, 0);
  for (int i = m; i > 0; i--) {
    s[i] = s[i + 1] + arr[i];
  }
  for (int i = 1; i <= m; i++) {
    cout << max(1ll * i, n - s[i] + 1) << " ";
  }
  cout << endl;
  return 0;
}
