#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
int n, k;
int a[N], c[N];
set<int> s;
set<int>::iterator i1;
int main() {
  scanf("%d%d", &n, &k);
  int mi = 1;
  for (int i = 1; i <= k; i++) {
    scanf("%d", &a[i]);
    if (s.size() && a[i] > (*s.begin())) {
      printf("-1");
      return 0;
    }
    if (a[i] == mi) {
      c[mi] = 1;
      mi++;
      while (s.find(mi) != s.end()) {
        c[mi] = 1;
        s.erase(mi);
        mi++;
      }
    } else
      s.insert(a[i]);
  }
  while (s.size()) {
    for (int i = (*s.begin()) - 1; c[i] == 0 && i >= 1; i--)
      a[++k] = i, c[i] = 1;
    c[*s.begin()] = 1;
    s.erase(s.begin());
  }
  for (int i = n; i >= 1; i--)
    if (!c[i])
      a[++k] = i;
    else
      break;
  for (int i = 1; i <= n; i++) printf("%d ", a[i]);
  return 0;
}
