#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long a[n], b[n];
  long long flag = 0;
  memset(b, 0, sizeof(b));
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    b[a[i] - 1]++;
    if (a[i] < i + 1) flag++;
  }
  vector<long long> v;
  long long j = 0;
  for (long long i = 0; i < n; i++) {
    if (b[i] == 0) {
      v.push_back(i + 1);
    }
  }
  if (flag) {
    cout << "-1" << '\n';
  } else {
    cout << a[0] << " ";
    for (long long i = 1; i < n; i++) {
      if (a[i] > a[i - 1])
        cout << a[i] << " ";
      else if (a[i] == a[i - 1]) {
        cout << v[j++] << " ";
      }
    }
    cout << endl;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
