#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    int aa[n + 5];
    bool f = true;
    for (int i = 1; i <= n; i++) aa[i] = i;
    for (int i = 1; i <= n; i++) {
      int a;
      cin >> a;
      if (a < i) f = false;
      if (a > i) swap(aa[i], aa[a]);
    }
    if (!f)
      cout << "-1" << endl;
    else {
      for (int i = 1; i <= n; i++) cout << aa[i] << " ";
      cout << endl;
    }
  }
}
