#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
const int maxn = 1e6 + 5;
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  for (int i = 1; i < n; i++) {
    if (v[i] < v[i - 1]) {
      cout << "-1\n";
      return;
    }
  }
  set<int> avail;
  for (int i = 1; i <= n; i++) {
    avail.insert(i);
  }
  bool ok = true;
  vector<int> ans(n);
  for (int i = 0; i < n; i++) {
    int hi = v[i];
    auto iter = avail.lower_bound(hi);
    if (avail.empty()) {
      ok = false;
      break;
    }
    if (iter == avail.end()) --iter;
    if (*iter > hi) {
      if (iter == avail.begin()) {
        ok = false;
        break;
      }
      --iter;
      ans[i] = *iter;
      avail.erase(ans[i]);
    } else {
      ans[i] = *iter;
      avail.erase(ans[i]);
    }
  }
  if (!ok) {
    cout << "-1\n";
    return;
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
