#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e16;
set<long long> S;
long long Q[100005], n;
long long res[100005];
void xuly() {
  for (long long i = 1; i <= n; ++i) S.insert(i);
  for (long long i = 1; i <= n; ++i) {
    auto it = S.lower_bound(Q[i]);
    if (*it == Q[i]) {
      res[i] = Q[i];
      S.erase(it);
    } else {
      if (*S.begin() > Q[i]) {
        cout << -1 << '\n';
        return;
      } else {
        res[i] = *S.begin();
        S.erase(S.begin());
      }
    }
  }
  for (long long i = 1; i <= n; ++i) cout << res[i] << " ";
  cout << '\n';
}
void nhap() {
  cin >> n;
  for (long long i = 1; i <= n; ++i) cin >> Q[i];
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long T;
  cin >> T;
  while (T--) {
    nhap();
    xuly();
  }
  return 0;
}
