#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, c;
  cin >> n >> k;
  vector<int> vector1(k);
  set<int> S;
  stack<int> stack1;
  for (i = 0; i < k; i++) cin >> vector1[i], S.insert(vector1[i]);
  c = 1;
  while (c <= n) {
    if (S.find(c) == S.end()) {
      stack1.push(c++);
    } else {
      c++;
      while (!stack1.empty()) vector1.push_back(stack1.top()), stack1.pop();
    }
  }
  while (!stack1.empty()) vector1.push_back(stack1.top()), stack1.pop();
  i = 0;
  c = 1;
  stack<int> s;
  while (c <= n) {
    if (s.empty() || s.top() != c) {
      while (i < n && vector1[i] != c) s.push(vector1[i]), i++;
      if (i < n && vector1[i] == c) s.push(vector1[i++]);
    }
    if (s.top() == c) {
      s.pop();
      c++;
    } else {
      cout << "-1\n";
      return 0;
    }
  }
  for (i = 0; i < n; i++) cout << vector1[i] << " ";
  cout << "\n";
  return 0;
}
