#include <bits/stdc++.h>
using namespace std;
int n, k, cur, a[200005], ans[200005], up, v;
stack<int> st;
set<int> NotUsed;
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    NotUsed.insert(-i);
  }
  for (int i = 1; i <= k; ++i) {
    cin >> ans[i];
  }
  cur = 1;
  for (int i = 1; i <= n; ++i) {
    if (i <= k) {
      if (NotUsed.find(-cur) == NotUsed.end()) {
        cout << -1 << endl;
        return 0;
      }
      st.push(ans[i]);
      NotUsed.erase(-ans[i]);
      while (!st.empty() && st.top() == cur) {
        cur++;
        st.pop();
      }
    } else {
      if (NotUsed.find(-cur) == NotUsed.end()) {
        cout << -1 << endl;
        return 0;
      }
      if (st.empty()) {
        up = n + 1;
      } else {
        up = st.top() - 1;
      }
      v = *NotUsed.lower_bound(-up);
      v = -v;
      ans[i] = v;
      st.push(ans[i]);
      NotUsed.erase(-ans[i]);
      while (!st.empty() && st.top() == cur) {
        cur++;
        st.pop();
      }
    }
  }
  if (cur != n + 1) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << ' ';
  }
  cout << endl;
  return 0;
}
