#include <bits/stdc++.h>
using namespace std;
void update(long long *x, long long *y, string s) {
  for (long long i = 0; i < s.length(); ++i) {
    if (s[i] == '0')
      *x -= 1;
    else if (s[i] == '1')
      *y -= 1;
  }
}
int main() {
  int t = 1;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    set<int> st;
    for (int i = 1; i <= n; ++i) st.insert(i);
    int a[n];
    for (int i = 0; i < n; ++i) cin >> a[i];
    int flag = 0;
    std::vector<int> v;
    v.push_back(a[0]);
    st.erase(a[0]);
    for (int i = 1; i < n; ++i) {
      if (a[i] <= i) {
        ++flag;
        break;
      }
      if (a[i] != a[i - 1]) {
        v.push_back(a[i]);
        st.erase(a[i]);
      } else {
        v.push_back(*st.begin());
        st.erase(st.begin());
      }
    }
    if (flag)
      cout << -1;
    else
      for (auto it : v) cout << it << ' ';
    cout << '\n';
  }
  return 0;
}
