#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5;
long long n, T, A[N], m, B[N];
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (long long i = 1; i <= m; ++i) cin >> A[i];
  long long nw = 1;
  for (long long i = 1; i <= m; ++i)
    if (n - A[i] + 1 >= nw)
      ++nw;
    else
      return puts("-1"), 0;
  nw = n;
  for (long long i = m; i; --i) {
    long long pos = nw - A[i] + 1;
    if (i <= pos)
      B[i] = pos;
    else
      B[i] = i;
    nw = B[i] - 1;
  }
  if (nw)
    puts("-1");
  else
    for (long long i = 1; i <= m; ++i) cout << B[i] << ' ';
  return 0;
}
