#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 4;
int n, k, a[N];
bool used[N], inStack[N];
set<int> s;
set<int> q;
void add(int& it) {
  if (s.size() && *s.begin() < a[it]) {
    cout << -1;
    exit(0);
  }
  inStack[a[it]] = 1;
  used[a[it]] = 1;
  s.insert(a[it]);
  ++it;
}
void sovle() {
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    q.insert(i);
  }
  for (int i = 0; i < k; ++i) {
    cin >> a[i];
    used[a[i]] = 1;
    q.erase(a[i]);
  }
  int it = 0;
  for (int i = 1; i <= n;) {
    if (used[i]) {
      if (inStack[i]) {
        int top = *s.begin();
        if (top != i) {
          cout << -1;
          exit(0);
        } else {
          s.erase(top);
          ++i;
        }
      } else {
        add(it);
      }
    } else {
      if (it < k) {
        add(it);
      } else {
        if (s.empty()) {
          a[it] = *q.rbegin();
          add(it);
          q.erase(*q.rbegin());
        } else {
          auto findIt = q.lower_bound(*s.begin());
          if (findIt == q.begin()) {
            cout << -1;
            exit(0);
          } else {
            --findIt;
            a[it] = *findIt;
            add(it);
            q.erase(findIt);
          }
        }
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << a[i] << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  sovle();
  return 0;
}
