#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n, k;
  cin >> n >> k;
  std::vector<int> v(n, -1);
  for (int i = 0; i < k; ++i) {
    int x;
    cin >> x;
    v[x - 1] = i;
  }
  for (int i = 0; i < n; i++) {
    if (v[i] == -1) continue;
    int j = i - 1;
    while (j >= 0 && v[j] == -1) {
      v[j--] = k++;
    }
  }
  int j = n - 1;
  while (v[j] == -1) v[j--] = k++;
  std::vector<int> q(n);
  for (int i = 0; i < n; ++i) {
    q[v[i]] = i;
  }
  std::vector<int> a = q;
  stack<int> st;
  std::vector<int> b(n);
  int p = -1;
  j = -1;
  for (int i = 0; i < n; i++) {
    st.push(a[i]);
    while (!st.empty() && st.top() == p + 1) {
      b[++j] = st.top();
      st.pop();
      p++;
    }
  }
  if (j != n - 1) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    cout << (q[i] + 1) << " ";
  }
  return 0;
}
