#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
const int MAX = 2e5 + 10;
int n, k;
int v[MAX];
int at;
bool ruim;
void solve(int l, int r) {
  if (ruim) return;
  if (l > r) return;
  if (at < k) {
    if (v[at] > r or v[at] < l) {
      ruim = 1;
      return;
    }
    int x = v[at];
    at++;
    solve(l, x - 1);
    solve(x + 1, r);
    return;
  }
  for (int i = r; i >= l; i--) v[at++] = i;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 0; i < k; i++) cin >> v[i];
  at = 1;
  solve(1, v[0] - 1);
  solve(v[0] + 1, n);
  if (ruim)
    cout << -1 << '\n';
  else {
    for (int i = 0; i < n; i++) cout << v[i] << " ";
    cout << '\n';
  }
  exit(0);
}
