#include <bits/stdc++.h>
using namespace std;
int main() {
  int tt;
  cin >> tt;
  while (tt--) {
    int n;
    cin >> n;
    vector<int> q(n);
    for (int& re : q) cin >> re;
    vector<int> ans(n);
    ans[0] = q[0];
    set<int> s;
    for (int i = 1; i <= n; ++i) {
      s.insert(i);
    }
    const int MAX = 100001;
    vector<int> used(MAX, false);
    used[q[0]] = true;
    s.erase(s.find(q[0]));
    bool ok = true;
    for (int i = 1; i < n; ++i) {
      if (q[i] < q[i - 1]) {
        ok = false;
        break;
      }
      if (used[q[i]]) {
        if (*s.begin() > q[i]) {
          ok = false;
          break;
        }
        ans[i] = *s.begin();
        used[*s.begin()] = true;
        if ((int)s.size() > 1) s.erase(s.begin());
      } else {
        ans[i] = q[i];
        used[q[i]] = true;
        auto it = s.find(q[i]);
        if (it != s.end()) {
          s.erase(it);
        }
      }
    }
    if (!ok) {
      cout << -1 << '\n';
      continue;
    }
    for (int i = 0; i < n; ++i) {
      cout << ans[i] << ' ';
    }
    cout << '\n';
  }
  return 0;
}
