#include <bits/stdc++.h>
const long long INF = (long long)1e9 + 9;
const long long maxn = (long long)1e6 + 6;
using namespace std;
signed main() {
  long long t = 0;
  cin >> t;
  while (t--) {
    long long n, good = true;
    cin >> n;
    set<long long> se;
    for (long long i = 1; i <= n; i++) se.insert(i);
    vector<long long> p(n);
    cin >> p[0];
    se.erase(p[0]);
    long long cur_max = p[0];
    for (long long i = 1; i < n; i++) {
      long long in;
      cin >> in;
      if (in == cur_max) {
        p[i] = *se.begin();
        se.erase(se.begin());
        if (p[i] > in) {
          good = false;
        }
      } else {
        if (se.find(in) != se.end()) {
          p[i] = in;
          se.erase(in);
        } else {
          good = false;
        }
      }
      cur_max = max(cur_max, in);
    }
    if (not good) {
      cout << "-1" << endl;
      continue;
    }
    for (long long i = 0; i < n; i++) {
      cout << p[i] << " \n"[i == n - 1];
    }
  }
  return 0;
}
