#include <bits/stdc++.h>
using namespace std;
priority_queue<int> q;
int a[200010], b[200010];
int main() {
  memset(a, 0, sizeof(a));
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= k; i++) scanf("%d", &b[i]);
  a[b[1]] = 1;
  int x = 0;
  q.push(-b[1]);
  for (int i = 2; i <= k; i++) {
    while (a[x + 1] == 1) {
      x++;
      if (-q.top() == x) q.pop();
    }
    if (!q.empty())
      if (b[i] > b[i - 1] && b[i] > -q.top()) {
        puts("-1");
        return 0;
      }
    a[b[i]] = 1;
    q.push(-b[i]);
    while (a[x + 1] == 1) {
      x++;
      if (-q.top() == x) q.pop();
    }
  }
  int cnt = 0;
  for (int i = 1; i <= k; i++) printf("%d ", b[i]), cnt++;
  for (int i = 1; i < n;)
    if (a[i] == 0 && a[i + 1] == 1) {
      printf("%d", i);
      a[i] = 1;
      cnt++;
      if (cnt < n)
        printf(" ");
      else
        printf("\n");
      i--;
      if (i < 1) i = 1;
    } else {
      i++;
    }
  for (int i = n; i >= 1; i--)
    if (a[i] == 0) {
      printf("%d", i);
      cnt++;
      if (cnt < n)
        printf(" ");
      else
        printf("\n");
    }
  return 0;
}
