#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, i, j, c = 0;
    cin >> n;
    long long int a[n];
    for (i = 1; i <= n; i++) a[i] = i;
    for (i = 1; i <= n; i++) {
      long long int x;
      cin >> x;
      if (i > x) c = 1;
      if (x > i) swap(a[i], a[x]);
    }
    if (c == 1)
      cout << -1 << endl;
    else {
      for (i = 1; i <= n; i++) cout << a[i] << " ";
      cout << endl;
    }
  }
  return 0;
}
