#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using ii = pair<int, int>;
using lu = unsigned long long;
using l = long long;
using vs = vector<string>;
using vii = vector<ii>;
using vl = vector<l>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
using vlu = vector<lu>;
using ll = pair<l, l>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
using vd = vector<double>;
using vvd = vector<vd>;
using mll = unordered_map<l, l>;
using sl = unordered_set<l>;
const l INF = numeric_limits<l>::max();
const double EPS = 1e-10;
const double PI = 3.14159265358979323846;
const l e0 = 1, e3 = 1000, e5 = 100000, e6 = 10 * e5, e7 = 10 * e6,
        e8 = 10 * e7, e9 = 10 * e8, l0 = 0, l1 = 1, l2 = 2;
const char lf = '\n';
void solve(istream &in, ostream &out);
void solve_brute(istream &, ostream &);
bool interactive_judge(istream &, istream &, ostream &);
bool generate_random(l, ostream &);
bool solution_checker(istream &, istream &, istream &, ostream &);
int main(int argc, char **argv) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  solve(cin, cout);
}
const l MOD = e9 + 7;
void solve(istream &in, ostream &out) {
  l tcc;
  in >> tcc;
  for (l tc = l(0); tc < l(tcc); tc++) {
    l n;
    in >> n;
    vb used(n);
    l p = 0;
    l m = 0;
    vl z(n);
    bool ok = true;
    for (l i = l(0); i < l(n); i++) {
      l x;
      in >> x;
      if (x < 1 or x > n) {
        ok = false;
        continue;
      }
      if (x > m) {
        m = x;
        z[i] = x;
        used[x - 1] = true;
        continue;
      }
      while (p < n && used[p]) p++;
      if (p >= m) {
        ok = false;
        continue;
      }
      z[i] = p + 1;
      used[p] = true;
    }
    (z);
    if (not ok) {
      out << -1 << lf;
      continue;
    } else {
      for (l i = l(0); i < l(n); i++) {
        if (i) out << ' ';
        out << z[i];
      }
      out << lf;
    }
  }
}
