#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(20);
  long long t = 0;
  cin >> t;
  for (long long i = 0; i < t; i++) {
    long long n = 0;
    cin >> n;
    deque<long long> q(n);
    for (auto& p : q) cin >> p;
    deque<long long> ans(n);
    ans[0] = q[0];
    bool ok = true;
    set<long long> us;
    for (long long j = 0; j < n; j++) us.insert(j + 1);
    us.erase(q[0]);
    for (long long j = 1; j < n; j++) {
      if (q[j] < q[j - 1]) {
        ok = false;
        break;
      } else if (q[j] == 1) {
        ok = false;
        break;
      } else if (q[j] == q[j - 1]) {
        if (*(us.begin()) > q[j]) {
          ok = false;
          break;
        } else {
          ans[j] = *(us.begin());
          us.erase(*us.begin());
        }
      } else if (q[j] > q[j - 1]) {
        ans[j] = q[j];
        us.erase(q[j]);
      }
    }
    if (ok) {
      for (auto& p : ans) cout << p << " ";
      cout << endl;
    } else
      cout << -1 << endl;
  }
  return 0;
}
