#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
void printv(vector<long long> arr, long long n) {
  for (long long i = 0; i < n; ++i) cout << arr[i] << " ";
  cout << endl;
}
void print(long long arr[], long long n) {
  for (long long i = 0; i < n; ++i) cout << arr[i] << " ";
  cout << endl;
}
bool isPrime(long long n) {
  bool flag = 1;
  for (long long i = 2; i <= sqrt(n); ++i) {
    if (n % i == 0) {
      flag = 0;
      break;
    }
  }
  return (flag ? 1 : 0);
}
long long mod_power(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = (res * x) % MOD;
    x = (x * x) % MOD;
    y >>= 1;
  }
  return res;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long T;
  cin >> T;
  while (T--) {
    long long n;
    cin >> n;
    vector<long long> a(n), vis(n + 1, 0), res(n, -1), rem;
    for (long long i = 0; i < n; ++i) {
      cin >> a[i];
    }
    bool ok = true;
    for (long long i = 0; i < n; ++i) {
      if (a[i] < i + 1) {
        ok = false;
        break;
      }
    }
    if (!ok) {
      cout << "-1\n";
      continue;
    }
    for (long long i = 0; i < n; ++i) {
      if (!vis[a[i]]) {
        res[i] = a[i];
        vis[a[i]] = 1;
      }
    }
    for (long long i = 1; i <= n; ++i) {
      if (!vis[i]) rem.push_back(i);
    }
    vis.clear();
    long long j = 0;
    for (long long i = 0; i < n; ++i) {
      if (res[i] == -1) {
        res[i] = rem[j++];
      }
    }
    printv(res, n);
  }
  return 0;
}
