#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  vector<int> used(1e5 + 13, 0);
  for (int j = 0; j < t; ++j) {
    fill(used.begin(), used.end(), 0);
    int n;
    cin >> n;
    vector<int> a(n + 1);
    bool f = false;
    for (int i = 1; i < n + 1; ++i) {
      cin >> a[i];
      if (a[i] < i) {
        f = true;
      }
    }
    for (int i = 2; i < n + 1; ++i) {
      if (a[i] < a[i - 1]) {
        f = true;
      }
    }
    if (f) {
      cout << -1 << '\n';
      continue;
    }
    vector<int> ans;
    ans.push_back(a[1]);
    used[a[1]] = 1;
    int now = (!used[1] ? 1 : 2);
    for (int i = 2; i < n + 1; ++i) {
      if (a[i] > a[i - 1]) {
        ans.push_back(a[i]);
        used[a[i]] = 1;
        if (now == a[i]) {
          now++;
        }
      } else {
        ans.push_back(now);
        while (used[++now])
          ;
      }
    }
    for (auto el : ans) {
      cout << el << ' ';
    }
    cout << '\n';
  }
}
