#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> pref(n), used(n + 228);
  for (int& it : pref) cin >> it;
  int mx = 0, q = 1;
  vector<int> ans(n);
  for (int i = 0; i < n; i++) {
    if (pref[i] == mx) {
      while (used[q]) ++q;
      ans[i] = q;
      used[q++] = 1;
    } else {
      mx = pref[i];
      used[mx] = 1;
      ans[i] = mx;
    }
  }
  for (int i = 0; i < n; i++) {
    if (pref[i] < ans[i]) {
      cout << "-1\n";
      return;
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  cout << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
