#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200010;
int n, k;
bool used[MAX_N];
vector<int> arr;
bool stackSortable() {
  stack<int> s;
  vector<int> res;
  for (int i = 0; i < (int)arr.size(); i++) {
    while (!s.empty() && arr[i] > s.top()) {
      res.push_back(s.top());
      s.pop();
    }
    s.push(arr[i]);
  }
  while (!s.empty()) res.push_back(s.top()), s.pop();
  for (int i = 0; i < (int)res.size() - 1; i++) {
    if (res[i] > res[i + 1]) return 0;
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 0; i < k; i++) {
    int k;
    cin >> k;
    used[k] = 1;
    arr.push_back(k);
  }
  if (!stackSortable()) {
    cout << "-1\n";
    return 0;
  }
  int lo = 1000000;
  int hi = 0;
  for (int i = 0; i < k; i++) {
    hi = max(hi, arr[i]);
    lo = min(lo, arr[i]);
  }
  for (int i = (lo)-1; i >= 1; i--) arr.push_back(i);
  vector<int> arr2;
  for (int i = 0; i < k; i++) arr2.push_back(arr[i]);
  sort(arr2.begin(), arr2.end());
  for (int i = 0; i < k - 1; i++) {
    for (int j = (arr2[i + 1]) - 1; j >= arr2[i] + 1; j--) arr.push_back(j);
  }
  for (int i = (n + 1) - 1; i >= hi + 1; i--) arr.push_back(i);
  if (!stackSortable()) {
    cout << "-1\n";
    return 0;
  } else {
    for (int i = 0; i < n; i++) {
      cout << arr[i];
      if (i != n - 1) cout << " ";
    }
  }
  cout << "\n";
}
