#include <bits/stdc++.h>
using namespace std;
const double EPS = (double)1e-9;
const int inf = 1e9;
const long long INF = 1e18;
const int mod = 1e6 + 3;
const int MAXN = 1e5 + 5;
int n;
int a[MAXN];
set<int> s;
void solve() {
  cin >> n;
  s.clear();
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    s.insert(i);
  }
  vector<int> res;
  res.clear();
  for (int i = 1; i <= n; i++) {
    auto it = s.lower_bound(n - a[i] + 1);
    if (it == s.end()) {
      cout << -1 << '\n';
      return;
    }
    res.push_back(n - *it + 1);
    s.erase(it);
  }
  for (auto i : res) {
    cout << i << ' ';
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << setprecision(6) << fixed;
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
