#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  scanf("%lld", &t);
  while (t--) {
    long long n;
    scanf("%lld", &n);
    long long a[n + 5];
    long long b[n + 5];
    memset(b, 0, sizeof(b));
    long long v[n + 5];
    memset(v, 0, sizeof(v));
    for (long long i = 1; i <= n; i++) {
      scanf("%lld", &a[i]);
      b[a[i]]++;
      if (b[a[i]] == 1) {
        v[i] = a[i];
      }
    }
    vector<long long> p;
    for (long long i = 1; i <= n; i++) {
      if (b[i] == 0) {
        p.push_back(i);
      }
    }
    long long j = 0;
    for (long long i = 1; i <= n; i++) {
      if (v[i] == 0) {
        v[i] = p[j];
        j++;
      }
    }
    long long mx = -1, flag = 0;
    for (long long i = 1; i <= n; i++) {
      mx = max(mx, v[i]);
      if (mx != a[i]) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) {
      cout << "-1\n";
    } else {
      for (long long i = 1; i <= n; i++) {
        cout << v[i] << " ";
      }
      cout << "\n";
    }
  }
}
