#include <bits/stdc++.h>
using namespace std;
long long int max(long long int a, long long int b) { return (a > b) ? a : b; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int ar[n], ar1[n], i = 1, j = 1;
    set<long long int> s;
    for (long long int i = 0; i < n; i++) cin >> ar[i];
    ar1[0] = ar[0];
    s.insert(ar[0]);
    for (i = 1; i < n; i++) {
      if (ar[i] > ar[i - 1]) {
        ar1[i] = ar[i];
        s.insert(ar[i]);
      } else {
        while (j < ar[i]) {
          if (s.find(j) == s.end()) {
            ar1[i] = j;
            s.insert(j);
            break;
          } else
            j++;
        }
        if (j == ar[i])
          break;
        else
          j++;
      }
    }
    if (i < n)
      cout << "-1";
    else
      for (long long int i = 0; i < n; i++) cout << ar1[i] << " ";
    cout << endl;
  }
  return 0;
}
