#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[200000 + 1];
int ap[200000 + 1];
int stk[200000 + 1];
bool verif() {
  int cr = 1;
  int i;
  int stkLen = 0;
  for (i = 1; i <= n; i++) {
    stk[++stkLen] = a[i];
    while (stkLen > 0 && stk[stkLen] == cr) {
      stkLen--;
      cr++;
    }
  }
  return (cr == (n + 1));
}
int main() {
  cin >> n >> k;
  int i;
  for (i = 1; i <= k; i++) {
    cin >> a[i];
    ap[a[i]] = 1;
  }
  int st = 0;
  int cr = k;
  for (i = 1; i <= n; i++) {
    if (ap[i] == 0) {
      if (st == 0) st = i;
    }
    if (i == n || ap[i + 1] == 1) {
      if (st != 0) {
        for (int j = i; j >= st; j--) {
          a[++cr] = j;
          ap[j] = 1;
        }
        st = 0;
      }
    }
  }
  if (verif()) {
    for (i = 1; i <= n; i++) cout << a[i] << " ";
    cout << "\n";
  } else
    cout << "-1\n";
  return 0;
}
