#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t-- > 0) {
    long long n;
    cin >> n;
    vector<long long> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    vector<long long> ans(n);
    ans[0] = a[0];
    set<long long> s;
    for (int i = 1; i <= n; i++) {
      if (i != a[0]) s.insert(i);
    }
    bool f = true;
    for (int i = 0; i < n - 1; i++) {
      if (a[i] > a[i + 1]) {
        f = false;
        break;
      }
    }
    long long maxi = n;
    int i = 1;
    map<long long, long long> m;
    while (i < n) {
      if (a[i] == a[i - 1]) {
        if (*s.begin() > a[i]) {
          f = false;
          break;
        } else {
          ans[i] = *s.begin();
          m[ans[i]] = i;
          s.erase(ans[i]);
        }
      } else {
        if (s.find(a[i]) != s.end()) {
          ans[i] = a[i];
          m[ans[i]] = i;
          s.erase(a[i]);
        } else {
          if (*s.begin() > a[m[a[i]]]) {
            f = false;
            break;
          } else {
            long long in = m[a[i]];
            ans[in] = *s.begin();
            m[ans[in]] = in;
            s.erase(s.begin());
            ans[i] = a[i];
            m[ans[i]] = i;
          }
        }
      }
      i++;
    }
    if (f) {
      for (int i = 0; i < n; i++) cout << ans[i] << " ";
      cout << endl;
    } else
      cout << -1 << endl;
  }
}
