#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n + 1];
    arr[0] = 0;
    set<int> second;
    vector<int> sol;
    for (int i = 1; i < n + 1; i++) {
      cin >> arr[i];
      second.insert(i);
    }
    for (int i = 1; i < n + 1; i++) {
      if (arr[i] != arr[i - 1]) {
        sol.push_back(arr[i]);
        second.erase(arr[i]);
      } else {
        if (!second.empty()) {
          auto it = second.begin();
          if (*it <= arr[i]) {
            sol.push_back(*it);
            second.erase(*it);
          } else {
            sol.clear();
            sol.push_back(-1);
            break;
          }
        } else {
          sol.clear();
          sol.push_back(-1);
          break;
        }
      }
    }
    for (auto i = sol.begin(); i != sol.end(); ++i) cout << *i << " ";
    cout << "\n";
  }
}
