#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
int a[maxn];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  set<int> c;
  c.clear();
  for (int i = 0; i < k; i++) {
    scanf("%d", &a[i]);
    c.insert(a[i]);
  }
  int in = k;
  int l = 0, r = 0;
  set<int>::iterator it;
  for (it = c.begin(); it != c.end(); it++) {
    l = r;
    r = *it;
    for (int j = r - 1; j > l; j--) {
      a[in++] = j;
    }
  }
  if (in < n) {
    for (int i = n; i > r; i--) {
      a[in++] = i;
    }
  }
  int flag = 0;
  int now = 0;
  stack<int> s;
  for (int i = 0; i < n; i++) {
    if (a[i] == now + 1) {
      now++;
    } else {
      while (!s.empty() && s.top() == now + 1) {
        now++;
        s.pop();
      }
      s.push(a[i]);
    }
  }
  while (!s.empty() && s.top() == now + 1) {
    now++;
    s.pop();
  }
  if (now != n) {
    printf("-1");
  } else {
    for (int i = 0; i < n; i++) {
      printf("%d ", a[i]);
    }
  }
  return 0;
}
