#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    vector<int> massive(n, 0);
    vector<int> permut(n, 0);
    vector<bool> used(n + 1, false);
    bool flag = true;
    for (int j = 0; j < n; j++) cin >> massive[j];
    permut[0] = massive[0];
    used[massive[0]] = true;
    int id = 1;
    if (massive[0] == 1) id++;
    for (int j = 1; j < n; j++) {
      if (massive[j] > massive[j - 1]) {
        permut[j] = massive[j];
        used[massive[j]] = true;
      } else {
        if (used[id])
          while (used[id] and id <= n) id++;
        if (id >= massive[j]) {
          cout << -1 << "\n";
          flag = false;
          break;
        }
        used[id] = true;
        permut[j] = id;
        while (used[id] and id <= n) id++;
      }
    }
    if (flag) {
      for (auto j : permut) cout << j << " ";
      cout << "\n";
    }
  }
}
