#include <bits/stdc++.h>
using namespace std;
int p[100200], q[100200];
set<int> num;
int main() {
  ios_base::sync_with_stdio(0), cin.tie();
  int t;
  cin >> t;
  while (t--) {
    int n, no = 0;
    cin >> n;
    for (int i = 1; i <= n; i++) num.insert(i);
    for (int i = 1; i <= n; i++) {
      p[i] = 0;
      cin >> q[i];
      if (q[i] != q[i - 1]) {
        p[i] = q[i];
        num.erase(p[i]);
      }
    }
    for (int i = 1; i <= n; i++)
      if (p[i] == 0) {
        if (q[i] >= *num.begin()) {
          p[i] = *num.begin();
          num.erase(p[i]);
        } else {
          no = 1;
          break;
        }
      }
    num.clear();
    if (no == 1)
      cout << -1 << "\n";
    else {
      for (int i = 1; i <= n; i++) cout << p[i] << " ";
      cout << "\n";
    }
  }
  return 0;
}
