#include <bits/stdc++.h>
using namespace std;
const long long t9p7 = 1000000007;
void soln(long long t) {
  long long n, k, a, b, c, cnt = 0, ans = 0, mn = LONG_LONG_MAX,
                           mx = LONG_LONG_MIN;
  string str;
  cin >> n;
  vector<long long> arr(n), ar(n), hsh(n + 1, 0);
  for (long long(i) = (0); (i) < (n); (i)++) {
    cin >> arr[i];
  }
  hsh[arr[0]] = 1;
  ar[0] = arr[0];
  a = 1;
  if (hsh[1]) a = 2;
  for (long long(i) = (1); (i) < (n); (i)++) {
    if (arr[i] == arr[i - 1]) {
      while (hsh[a]) a++;
      if (a > i) {
        ans = 1;
        break;
      }
      hsh[a] = 1;
      ar[i] = a;
    } else {
      if (hsh[arr[i]]) {
        ans = 1;
        break;
      }
      hsh[arr[i]] = 1;
      ar[i] = arr[i];
    }
  }
  if (ans) {
    cout << -1 << endl;
  } else {
    for (auto(xd) : (ar)) cout << xd << " ";
    cout << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long t = 1;
  cin >> t;
  while ((t)--) soln(t);
  return 0;
}
