#include <bits/stdc++.h>
void solution() {
  int n;
  std::cin >> n;
  std::vector<int> q(n);
  for (auto &e : q) std::cin >> e;
  std::vector<int> p(n);
  p[0] = q[0];
  std::vector<char> used(n + 1, false);
  used[p[0]] = true;
  int min = 1;
  while (min < used.size() && used[min]) ++min;
  for (int i = 1; i < n; ++i) {
    if (q[i] == q[i - 1]) {
      if (min == used.size()) std::cout << -1 << "\n";
      if (min >= q[i]) {
        std::cout << -1 << "\n";
        return;
      }
      p[i] = min;
      used[p[i]] = true;
      while (min < used.size() && used[min]) ++min;
    } else {
      p[i] = q[i];
      used[p[i]] = true;
      while (min < used.size() && used[min]) ++min;
    }
  }
  for (auto e : p) std::cout << e << " ";
  std::cout << "\n";
}
int main() {
  int t;
  std::cin >> t;
  for (int ti = 0; ti < t; ++ti) {
    solution();
  }
  return 0;
}
