#include <bits/stdc++.h>
using namespace std;
long long k, l, m, n, o, p, r, s, t, x, kol, q;
int pr[100005], nom[100005], used[100005], a[100005];
int ansfor() {
  a[1] = pr[1];
  used[a[1]] = 1;
  int si = 1;
  for (int i = 2; i <= n; i++) {
    if (pr[i] > pr[i - 1]) {
      if (used[pr[i]]) return (-1);
      a[i] = pr[i];
      used[a[i]] = 1;
    } else {
      while (si < pr[i] && used[si] == 1) si++;
      if (!used[si]) {
        a[i] = si;
        used[si] = 1;
        si++;
      } else {
        return (-1);
      }
    }
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> q;
  for (int w = 1; w <= q; w++) {
    cin >> n;
    for (int i = 1; i <= n; i++) {
      cin >> pr[i];
      nom[i] = -1;
      used[i] = 0;
    }
    if (ansfor() == -1) {
      cout << "-1\n";
    } else {
      for (int i = 1; i <= n; i++) cout << a[i] << " ";
      cout << "\n";
    }
  }
}
