#include <bits/stdc++.h>
using namespace std;
static struct IO {
  char tmp[1 << 10];
  char cur;
  inline char nextChar() { return cur = getchar(); }
  inline char peekChar() { return cur; }
  inline operator bool() { return peekChar(); }
  inline static bool isBlank(char c) { return (c < '-' && c); }
  inline bool skipBlanks() {
    while (isBlank(nextChar()))
      ;
    return peekChar() != 0;
  }
  inline IO& operator>>(char& c) {
    c = nextChar();
    return *this;
  }
  inline IO& operator>>(char* buf) {
    if (skipBlanks()) {
      if (peekChar()) {
        *(buf++) = peekChar();
        while (!isBlank(nextChar())) *(buf++) = peekChar();
      }
      *(buf++) = 0;
    }
    return *this;
  }
  inline IO& operator>>(string& s) {
    if (skipBlanks()) {
      s.clear();
      s += peekChar();
      while (!isBlank(nextChar())) s += peekChar();
    }
    return *this;
  }
  inline IO& operator>>(double& d) {
    if ((*this) >> tmp) sscanf(tmp, "%lf", &d);
    return *this;
  }
  inline IO& operator>>(int& n) {
    if (skipBlanks()) {
      int sign = +1;
      if (peekChar() == '-') {
        sign = -1;
        n = nextChar() - '0';
      } else
        n = peekChar() - '0';
      while (!isBlank(nextChar())) {
        n += n + (n << 3) + peekChar() - 48;
      }
      n *= sign;
    }
    return *this;
  }
  inline IO& operator>>(unsigned int& n) {
    if (skipBlanks()) {
      int sign = +1;
      if (peekChar() == '-') {
        sign = -1;
        n = nextChar() - '0';
      } else
        n = peekChar() - '0';
      while (!isBlank(nextChar())) {
        n += n + (n << 3) + peekChar() - 48;
      }
      n *= sign;
    }
    return *this;
  }
  inline IO& operator>>(long long& n) {
    if (skipBlanks()) {
      int sign = +1;
      if (peekChar() == '-') {
        sign = -1;
        n = nextChar() - '0';
      } else
        n = peekChar() - '0';
      while (!isBlank(nextChar())) {
        n += n + (n << 3) + peekChar() - 48;
      }
      n *= sign;
    }
    return *this;
  }
  inline void putChar(char c) { putchar(c); }
  inline IO& operator<<(char c) {
    putChar(c);
    return *this;
  }
  inline IO& operator<<(const char* s) {
    while (*s) putChar(*s++);
    return *this;
  }
  inline IO& operator<<(const string& s) {
    for (int i = 0; i < (int)s.size(); ++i) putChar(s[i]);
    return *this;
  }
  char* toString(double d) {
    sprintf(tmp, "%lf%c", d, '\0');
    return tmp;
  }
  inline IO& operator<<(double d) { return (*this) << toString(d); }
  inline char* toString(int n) {
    char* p = (tmp + 30);
    if (n) {
      bool isNeg = 0;
      if (n < 0) isNeg = 1, n = -n;
      while (n) *--p = (n % 10) + '0', n /= 10;
      if (isNeg) *--p = '-';
    } else
      *--p = '0';
    return p;
  }
  inline IO& operator<<(int n) { return (*this) << toString(n); }
  inline char* toString(long long n) {
    char* p = (tmp + 30);
    if (n) {
      bool isNeg = 0;
      if (n < 0) isNeg = 1, n = -n;
      while (n) *--p = (n % 10) + '0', n /= 10;
      if (isNeg) *--p = '-';
    } else
      *--p = '0';
    return p;
  }
  inline IO& operator<<(long long n) { return (*this) << toString(n); }
} __io__;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long int add(long long int x, long long int y) {
  x += y;
  if (x >= 1000000007) return x - 1000000007;
  return x;
}
long long int sub(long long int x, long long int y) {
  x -= y;
  if (x < 0) return x + 1000000007;
  return x;
}
long long int mult(long long int x, long long int y) {
  return ((long long int)x * y) % 1000000007;
}
long long int bin_pow(long long int x, long long int p) {
  if (p == 0) return 1;
  if (p & 1) return mult(x, bin_pow(x, p - 1));
  return bin_pow(mult(x, x), p / 2);
}
long long int rev(long long int x) { return bin_pow(x, 1000000007 - 2); }
struct Point {
  long long int x, y;
  Point() : x(), y() {}
  Point(long long int _x, long long int _y) : x(_x), y(_y) {}
  Point operator+(const Point& a) const { return Point(x + a.x, y + a.y); }
  long long int operator*(const Point& a) const { return x * a.y - y * a.x; }
};
long long int getQ(const Point& v) {
  if (v.y != 0) return (v.y > 0 ? 0 : 1);
  return (v.x > 0 ? 0 : 1);
}
inline bool cmp(pair<long long int, long long int> a,
                pair<long long int, long long int> b) {
  return a.first > b.first;
}
long long int a[100005];
long long int ans[100005];
int32_t main() {
  long long int n, m;
  __io__ >> n >> m;
  long long int s = 0;
  for (long long int i = 1; i <= m; i++) {
    __io__ >> a[i];
    s += a[i];
  }
  if (s < n) return __io__ << -1, 0;
  long long int cur = 1;
  for (long long int i = 1; i <= m; i++) {
    ans[i] = cur++;
    s -= a[i];
    while (cur < n - s + 1) cur++;
    if (a[i] + ans[i] - 1 > n) return __io__ << -1, 0;
  }
  for (long long int i = 1; i <= m; i++) __io__ << ans[i] << " ";
  return 0;
}
