#include <bits/stdc++.h>
using namespace std;
int vis[200500];
int t[200500];
stack<int> s;
queue<int> a;
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < k; i++) {
    cin >> t[i];
    vis[t[i]]++;
    a.push(t[i]);
  }
  int btop = 1;
  while (btop <= n) {
    if (!s.empty() && s.top() == btop) {
      s.pop();
      btop++;
    } else if (!a.empty()) {
      s.push(a.front());
      a.pop();
    } else {
      if (s.empty()) {
        for (int i = k; i < n; i++) t[i] = n - (i - k);
        k = n, btop = n + 1;
      } else {
        for (int i = s.top() - 1; i >= btop; i--) {
          if (!vis[i]) {
            vis[i] = 1;
            t[k++] = i;
          } else {
            cout << -1 << endl;
            return 0;
          }
        }
        btop = s.top();
      }
    }
  }
  if (!s.empty() || !a.empty() || k != n)
    cout << -1 << endl;
  else {
    cout << t[0];
    for (int i = 1; i < n; i++) cout << ' ' << t[i];
    cout << endl;
  }
}
