#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--) {
    int n;
    cin >> n;
    int arr[n + 1];
    for (int i = 1; i <= n; i++) cin >> arr[i];
    int p[n + 1];
    for (int i = 0; i <= n; i++) p[i] = i;
    int flag = 0;
    for (int i = 1; i <= n; i++) {
      if (arr[i] < i) flag = 1;
      if (arr[i] != i) swap(p[i], p[arr[i]]);
    }
    if (flag == 1)
      cout << "-1";
    else
      for (int i = 1; i <= n; i++) cout << p[i] << " ";
    cout << "\n";
  }
}
