#include <bits/stdc++.h>
using namespace std;
constexpr long long MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  int n, k;
  cin >> n >> k;
  vector<int> a;
  vector<int> S;
  int cur = 1;
  for (int i = 0; i < k; ++i) {
    int x;
    cin >> x;
    a.push_back(x);
    S.push_back(x);
    while (!S.empty() && S.back() == cur) {
      S.pop_back();
      ++cur;
    }
  }
  vector<int> T;
  while (cur <= n) {
    if (!S.empty() && S.back() < cur) {
      cout << -1 << endl;
      return 0;
    } else if (S.empty() || S.back() != cur) {
      T.push_back(cur++);
    } else if (!S.empty() && S.back() == cur) {
      S.pop_back();
      while (!T.empty()) {
        a.push_back(T.back());
        T.pop_back();
      }
      ++cur;
    }
  }
  if (!S.empty()) {
    cout << -1 << endl;
    return 0;
  }
  reverse(T.begin(), T.end());
  for (int x : a) cout << x << " ";
  for (int x : T) cout << x << " ";
  cout << endl;
  return 0;
}
