#include <bits/stdc++.h>
using namespace std;
signed main() {
  int t;
  cin >> t;
  for (int j = 0; j < t; ++j) {
    int n;
    cin >> n;
    vector<int> q(n);
    for (int i = 0; i < n; ++i) {
      cin >> q[i];
    }
    bool flag = false;
    for (int i = 0; i < n; ++i) {
      if (q[i] < i + 1) {
        cout << -1 << endl;
        flag = true;
        break;
      }
    }
    if (flag) {
      continue;
    }
    if (!is_sorted(q.begin(), q.end())) {
      cout << -1 << endl;
      continue;
    }
    set<int> not_used;
    for (int i = 1; i <= n; ++i) {
      not_used.insert(i);
    }
    vector<int> p;
    p.assign(n, -1);
    for (int i = n - 1; i >= 1; --i) {
      if (q[i] != q[i - 1]) {
        p[i] = q[i];
        not_used.erase(not_used.find(p[i]));
      }
    }
    p[0] = q[0];
    not_used.erase(not_used.find(p[0]));
    for (int i = 0; i < n; ++i) {
      if (p[i] == -1) {
        p[i] = *not_used.begin();
        not_used.erase(not_used.begin());
      }
    }
    for (auto elem : p) {
      cout << elem << " ";
    }
    cout << endl;
  }
  return 0;
}
