#include <bits/stdc++.h>
using namespace std;
int t, n, a[100001];
bool ok, v[100001];
int main() {
  cin >> t;
  for (int tt = 1; tt <= t; tt++) {
    cin >> n;
    ok = true;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      v[i] = false;
      if (a[i] < i) ok = false;
    }
    if (not ok)
      cout << "-1" << endl;
    else {
      int nr = 1;
      cout << a[1] << ' ';
      v[a[1]] = true;
      for (int i = 2; i <= n; i++) {
        if (a[i] == a[i - 1]) {
          while (v[nr]) nr++;
          cout << nr << ' ';
          v[nr] = true;
          nr++;
        } else {
          cout << a[i] << ' ';
          v[a[i]] = true;
        }
      }
      cout << endl;
    }
  }
  return 0;
}
