#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000000 + 7;
const long long int MOD1 = 998244353;
long long int pwr(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a *= a;
    b >>= 1;
  }
  return res;
}
vector<pair<long long int, long long int>> v;
long long int dp[1000][1000];
long long int knap(long long int lm, long long int i) {
  if (lm <= 0 || i < 0) {
    return 0;
  }
  if (dp[i][lm] != -1) return dp[i][lm];
  if (v[i].first <= lm) {
    return dp[i][lm] =
               max(v[i].second + knap(lm - v[i].first, i - 1), knap(lm, i - 1));
  } else
    return dp[i][lm] = knap(lm, i - 1);
}
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int n, m;
  cin >> n >> m;
  vector<pair<long long int, long long int>> v;
  long long int a[m];
  long long int ans[m + 1];
  long long int sum = 0;
  for (long long int i = (long long int)0; i < (long long int)m; i++) {
    long long int tmp;
    cin >> tmp;
    v.push_back({tmp, i});
  }
  long long int ctr = 0;
  for (long long int i = (long long int)0; i < (long long int)v.size(); i++) {
    if ((v[i].first + i) > n) {
      ctr++;
      break;
    } else {
      ans[i] = i + 1;
    }
  }
  if (ctr > 0)
    cout << "-1\n";
  else {
    long long int sz = v.size();
    long long int rt = n;
    for (long long int i = (long long int)v.size() - 1; i >= (long long int)0;
         i--) {
      if (ans[v[i].second] + v[i].first - 1 < rt) {
        ans[v[i].second] = rt - v[i].first + 1;
        rt -= v[i].first;
      } else {
        break;
      }
    }
    if (ans[v[0].second] != 1)
      cout << "-1\n";
    else {
      for (long long int i = (long long int)0; i < (long long int)m; i++)
        cout << ans[i] << " ";
    }
  }
  cerr << "Time Elapsed : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
