#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> v(n), ans(n), used(n + 10);
    for (long long i = 0; i < n; i++) {
      cin >> v[i];
    }
    long long now = 1, mx = 0;
    bool x = 0;
    for (long long i = 0; i < n; i++) {
      if (v[i] > mx) {
        mx = v[i];
        ans[i] = v[i];
        used[v[i]] = 1;
      } else {
        while (used[now]) {
          now++;
        }
        ans[i] = now;
        used[now] = 1;
        if (now > mx) {
          x = 1;
          break;
        }
      }
    }
    if (!x) {
      for (auto to : ans) {
        cout << to << " ";
      }
    } else {
      cout << -1;
    }
    cout << endl;
  }
  return 0;
}
