#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 10;
void solve() {
  int n;
  cin >> n;
  vector<int> q(n);
  for (int& i : q) cin >> i;
  vector<int> ans(n);
  ans[0] = q[0];
  set<int> all;
  for (int i = 1; i < n; i++)
    if (q[i] < q[i - 1]) {
      cout << -1 << endl;
      return;
    }
  for (int i = 1; i <= n; ++i) all.insert(i);
  all.erase(ans[0]);
  vector<int> used(n, 0);
  used[0] = true;
  for (int i = 1; i < n; ++i)
    if (q[i] != q[i - 1]) {
      ans[i] = q[i];
      if (!all.count(q[i])) {
        cout << -1 << endl;
        return;
      }
      all.erase(q[i]);
      used[i] = true;
    }
  for (int i = 0; i < n; ++i)
    if (!used[i]) {
      ans[i] = *all.begin();
      if (ans[i] > q[i]) {
        cout << -1 << endl;
        return;
      }
      all.erase(all.begin());
    }
  set<int> a;
  for (int i : ans) a.insert(i);
  if (*a.begin() != 1 || a.size() != n) {
    cout << -1 << endl;
    return;
  }
  for (int i : ans) cout << i << ' ';
  cout << endl;
}
int32_t main() {
  int n;
  cin >> n;
  while (n--) solve();
  return 0;
}
