#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 77;
const int Mod = 1e9 + 7;
int n, a[N], k;
bool mark[N], p[N];
vector<int> S;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", a + i);
    mark[a[i]] = true;
  }
  mark[n + 1] = true;
  for (int i = 1; i <= n + 1; i++) {
    if (mark[i]) {
      while (S.size()) {
        a[++k] = S.back();
        S.pop_back();
      }
      continue;
    }
    S.push_back(i);
  }
  bool f = false;
  int x = 1;
  for (int i = 1; i <= n; i++) {
    S.push_back(a[i]);
    while (S.size() && S.back() == x) {
      x++;
      S.pop_back();
    }
  }
  if (S.size()) return !printf("-1");
  for (int i = 1; i <= n; i++) {
    printf("%d ", a[i]);
  }
  return 0;
}
