#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long power_mod(long long a, long long b) {
  if (b == 0) {
    return 1;
  }
  long long temp = power_mod(a, b / 2);
  temp = (temp * temp) % 1000000007;
  if (b % 2) {
    temp = (temp * a) % 1000000007;
  }
  return temp;
}
long long NCR(long long n, long long r) {}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> v(n);
    for (int i = 0; i < n; ++i) {
      cin >> v[i];
    }
    vector<int> ans(n);
    ans[0] = v[0];
    vector<bool> b(n + 1, false);
    b[v[0]] = true;
    int index = 1;
    bool poss = true;
    for (int i = 1; i < n; ++i) {
      if (v[i] > v[i - 1]) {
        ans[i] = v[i];
      } else {
        while (index < n && b[index]) {
          ++index;
        }
        if (index > v[i] || index == n) {
          poss = false;
          break;
        }
        ans[i] = index;
        ++index;
      }
      b[ans[i]] = true;
    }
    if (!poss) {
      cout << -1 << "\n";
      continue;
    }
    for (int i : ans) {
      cout << i << ' ';
    }
    cout << "\n";
  }
}
