#include <bits/stdc++.h>
using namespace std;
const int Z = (int)1e5 + 111;
const int inf = (int)1e9 + 111;
const long long llinf = (long long)1e18 + 111;
const long double pi = acos(-1.0);
long long t, n, m;
int main() {
  cin >> t;
  while (t-- > 0) {
    cin >> n;
    vector<int> a(n + 1);
    vector<int> ans(n + 1);
    set<int> st;
    bool flag = false;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      st.insert(i);
    }
    ans[1] = a[1];
    st.erase(st.find(a[1]));
    for (int i = 2; i <= n; i++) {
      if (a[i - 1] != a[i]) {
        st.erase(st.find(a[i]));
        ans[i] = a[i];
      } else {
        int it = *st.begin();
        if (it > a[i]) {
          flag = true;
          break;
        } else {
          ans[i] = it;
          st.erase(st.begin());
        }
      }
    }
    if (!flag) {
      for (int i = 1; i <= n; i++) {
        cout << ans[i] << " ";
      }
      cout << "\n";
    } else {
      cout << -1 << "\n";
    }
  }
}
