#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int T = 0; T < t; T++) {
    int n;
    cin >> n;
    vector<int> ar(n);
    int die = 0;
    for (int i = 0; i < n; i++) {
      cin >> ar[i];
      if (ar[i] > n) {
        die = 1;
      }
    }
    if (die) {
      cout << "-1\n";
    } else {
      vector<int> free(n + 1, 1);
      free[ar[0]] = 0;
      for (int i = 1; i < n; i++) {
        if (ar[i] > ar[i - 1]) {
          free[ar[i]] = 0;
        }
      }
      vector<int> other;
      for (int i = 1; i <= n; i++) {
        if (free[i] == 1) {
          other.push_back(i);
        }
      }
      vector<int> ans;
      int used = 0;
      int ok = 1;
      for (int i = 1; i < n; i++) {
        if (ar[i] == ar[i - 1]) {
          if (other[used] < ar[i]) {
            ans.push_back(other[used]);
            used++;
          } else {
            ok = 0;
            break;
          }
        }
      }
      if (ok) {
        cout << ar[0] << " ";
        int id = 0;
        for (int i = 1; i < n; i++) {
          if (ar[i] > ar[i - 1]) {
            cout << ar[i] << " ";
          } else {
            cout << ans[id] << " ";
            id++;
          }
        }
        cout << "\n";
      } else {
        cout << "-1\n";
      }
    }
  }
}
