#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long i, j, k, n;
    cin >> n;
    vector<long long> arr(n), ans(n), visited(n + 1, 0);
    set<long long> s;
    for (i = 0; i < n; ++i) {
      s.insert(i + 1);
      cin >> arr[i];
    }
    ans[0] = arr[0];
    s.erase(s.find(arr[0]));
    visited[arr[0]] = 1;
    bool f = true;
    for (i = 1; i < n; ++i) {
      if (arr[i] > arr[i - 1]) {
        if (!visited[arr[i]]) {
          ans[i] = arr[i];
          visited[arr[i]] = 1;
          s.erase(s.find(arr[i]));
        } else {
          f = false;
          break;
        }
      } else {
        auto it = s.begin();
        if (*it > arr[i]) {
          f = false;
          break;
        } else {
          visited[*it] = 1;
          ans[i] = *it;
          s.erase(it);
        }
      }
    }
    if (f) {
      for (i = 0; i < n; ++i) cout << ans[i] << " ";
      cout << "\n";
    } else {
      cout << "-1\n";
    }
  }
  return 0;
}
