#include <bits/stdc++.h>
using namespace std;
int arr[400033], pp;
int main() {
  int n, k, i;
  scanf("%d%d", &n, &k);
  for (i = 0; i < k; i++) scanf("%d", &arr[i]);
  stack<int> s;
  int curr = 1, pos = 1;
  for (i = 0; i < k; i++) {
    if (arr[i] == curr)
      curr++;
    else
      s.push(arr[i]);
    while (!s.empty() && s.top() == curr) {
      curr++;
      s.pop();
    }
  }
  if (k == n) {
    if (curr == (n + 1))
      for (i = 0; i < k; i++) printf("%d ", arr[i]);
    else
      printf("-1");
    return 0;
  }
  while (1) {
    if (s.empty()) {
      int aa = n;
      while (k < n) {
        arr[k++] = aa--;
      }
      for (i = 0; i < k; i++) printf("%d ", arr[i]);
      return 0;
    } else {
      int aa = s.top() - 1;
      if (aa + 1 < curr) {
        printf("-1");
        return 0;
      }
      while (k < n && aa >= curr) {
        arr[k++] = aa--;
      }
      curr = s.top() + 1;
      s.pop();
    }
    if (k > n) {
      printf("-1");
      return 0;
    }
  }
  return 0;
}
