#include <bits/stdc++.h>
using namespace std;
const int N = 1000004, O = 1000000;
int a[N], n, k;
bool vis[N];
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", &a[i]);
    vis[a[i]] = 1;
  }
  vector<int> z;
  for (int i = 1, j; i <= n; i++) {
    if (vis[i]) continue;
    j = i;
    z.clear();
    for (; j <= n && !vis[j]; j++) z.push_back(j);
    i = j;
    reverse(z.begin(), z.end());
    for (int x : z) a[++k] = x;
  }
  bool ok = 1;
  stack<int> st;
  for (int i = 1, p = 1; i <= n; i++) {
    if (!st.empty() && st.top() == i) {
      st.pop();
      continue;
    }
    for (; p <= n && a[p] != i; p++) st.push(a[p]);
    if (p > n) {
      ok = 0;
      break;
    }
    ++p;
  }
  if (ok) {
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
  } else
    puts("-1");
}
