#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 200005;
int a[maxn];
stack<int> s;
int main() {
  int n, k;
  cin >> n >> k;
  s.push(n + 1);
  int cur = 1;
  for (int i = 1; i <= n; i++) {
    if (i <= k)
      cin >> a[i];
    else
      a[i] = s.top() - 1;
    s.push(a[i]);
    while (!s.empty() && cur == s.top()) s.pop(), cur++;
  }
  if (s.empty())
    for (int i = 1; i <= n; i++) cout << a[i] << " ";
  else
    cout << -1;
  return 0;
}
