#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long double PI = acos(-1);
const int N = 1e5 + 10;
const int mod = 1e9 + 7;
const int mod1 = 998244353;
const long long INF = 2e18;
template <class T>
inline void amin(T &x, const T &y) {
  if (y < x) x = y;
}
template <class T>
inline void amax(T &x, const T &y) {
  if (x < y) x = y;
}
int read() {
  long long s = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    s = s * 10 + c - '0';
    c = getchar();
  }
  return s * f;
}
long long Pow(long long a, long long b) {
  if (a == 1 || b == 1) return a;
  if (b % 2 == 1) return (a * Pow(a, b - 1)) % mod;
  return (Pow(a, b / 2) * Pow(a, b / 2)) % mod;
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool isPrime(int n) {
  if (n <= 1) return false;
  for (int i = 2; i < n; i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    bool flag = false;
    int a[100005];
    int p[100005];
    for (int i = 1; i <= n; i++) {
      p[i] = i;
    }
    for (int i = 1; i <= n; i++) {
      int k;
      cin >> k;
      if (k > i) {
        swap(p[i], p[k]);
      }
      if (k < i) {
        flag = true;
      }
    }
    if (flag) {
      cout << -1 << endl;
      continue;
    } else {
      for (int i = 1; i <= n; i++) {
        cout << p[i] << " ";
      }
      cout << endl;
      continue;
    }
  }
  return 0;
}
