#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const int mod = 1e9 + 7;
void solve() {
  int n, m, i, j, k, l, r, x, y, z, a, b, c;
  cin >> n;
  vector<int> v(n);
  for (int zz = 0; zz < n; zz++) cin >> v[zz];
  if (n == 1) {
    cout << 1 << "\n";
    return;
  }
  vector<int> ans(n, 0);
  ans[0] = v[0];
  bool yo = true;
  vector<bool> tak(n + 1, 0);
  tak[v[0]] = true;
  j = 1;
  for (i = 1; i < n; i++) {
    if (v[i] < i + 1) {
      yo = false;
      break;
    }
    if (v[i] != v[i - 1]) {
      if (v[i] < v[i - 1]) {
        yo = false;
        break;
      } else {
        ans[i] = v[i];
        tak[v[i]] = true;
      }
    } else {
      for (j; j <= n; j++) {
        if (tak[j] == false) {
          ans[i] = j;
          tak[j] = true;
          break;
        }
      }
    }
  }
  if (yo) {
    for (int zzz = 0; zzz < ans.size(); zzz++) cout << ans[zzz] << " ";
    cout << "\n";
  } else {
    cout << -1 << "\n";
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
}
