#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-6;
template <class T>
T gcd(T a, T b) {
  if (!b) return a;
  return gcd(b, a % b);
}
const int maxn = 2e5 + 10;
int n, k, a[maxn], vis[maxn], sum[maxn], now;
vector<int> ans;
stack<int> stk;
int main() {
  scanf("%d", &n);
  scanf("%d", &k);
  int mx = -1;
  for (int i = 0; i < k; i++) scanf("%d", &a[i]);
  for (int i = 0; i < k; i++) {
    ans.push_back(a[i]);
  }
  sort(a, a + k);
  a[k++] = n + 1;
  int pre = 1;
  for (int i = 0; i < k; i++) {
    for (int j = a[i] - 1; j >= pre; j--) {
      ans.push_back(j);
    }
    pre = a[i] + 1;
  }
  now = 1;
  for (int i = 0; i < n; i++) {
    while (stk.size() && stk.top() == now) {
      now++;
      stk.pop();
    }
    stk.push(ans[i]);
  }
  while (stk.size() && stk.top() == now) {
    now++;
    stk.pop();
  }
  if (now < n) {
    printf("-1\n");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[i]);
  }
  puts("");
  return 0;
}
