#include <bits/stdc++.h>
using namespace std;
const int DIM = 200005;
int mrk[DIM], prm[DIM], stk[DIM];
bool solve(int n) {
  int k = 0, ls = 1;
  for (int i = 1; i <= n; ++i) {
    stk[++k] = prm[i];
    while (k and stk[k] == ls) {
      ++ls;
      --k;
    }
  }
  return (k == 0);
}
int main(void) {
  int n, k, kk;
  cin >> n >> k;
  kk = k;
  for (int i = 1; i <= k; ++i) {
    cin >> prm[i];
    mrk[prm[i]] = 1;
  }
  for (int i = 1; i <= n; ++i) {
    if (mrk[i]) continue;
    mrk[i] = 2;
    prm[++kk] = i;
  }
  if (solve(n)) {
    kk = k + 1;
    for (int i = 1; i <= n; ++i) {
      if (mrk[i] == 1) continue;
      int j = i;
      while (j + 1 <= n and mrk[j + 1] == 2) ++j;
      reverse(prm + kk, prm + kk + (j - i + 1));
      kk += j - i + 1;
      i = j;
    }
    for (int i = 1; i <= n; ++i) cout << prm[i] << " ";
  } else
    cout << -1;
  return 0;
}
