#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<long int> a(n);
    vector<long int> b(n + 1, 0);
    int flag = 1;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] <= i) flag = 0;
    }
    if (!flag) {
      cout << -1 << "\n";
      continue;
    }
    for (int i = 1; i <= n; i++) b[i] = i;
    for (int i = 1; i <= n; i++) {
      if (a[i - 1] > b[i]) swap(b[i], b[a[i - 1]]);
    }
    for (int i = 1; i <= n; i++) cout << b[i] << " ";
    cout << "\n";
  }
  return 0;
}
