#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    set<int> S;
    for (int i = 1; i < n + 1; i++) {
      S.insert(i);
    }
    vector<int> ans;
    int prev = 0, curr;
    bool ok = true;
    while (n--) {
      cin >> curr;
      if (!ok) {
        continue;
      }
      if (curr > prev) {
        ans.push_back(curr);
        S.erase(curr);
      } else {
        if (*S.begin() > curr) {
          ok = false;
          continue;
        }
        ans.push_back(*S.begin());
        S.erase(S.begin());
      }
      prev = curr;
    }
    if (ok) {
      for (int x : ans) {
        cout << x << " ";
      }
    } else {
      cout << -1;
    }
    cout << "\n";
  }
  return 0;
}
