#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  for (int tt = 0; tt < t; tt++) {
    int n, flag = 0;
    cin >> n;
    vector<int> q(n + 1);
    vector<int> p(n + 1, -1);
    vector<int> use(n + 1, 0);
    for (int i = 1; i <= n; i++) cin >> q[i];
    p[1] = q[1];
    use[q[1]] = 1;
    for (int i = 2; i <= n; i++)
      if (q[i] > q[i - 1]) {
        p[i] = q[i];
        use[q[i]] = 1;
      }
    vector<int> w;
    for (int i = 1; i <= n; i++)
      if (use[i] == 0) w.push_back(i);
    int u = 0;
    for (int i = 1; i <= n; i++)
      if (p[i] == -1) {
        p[i] = w[u];
        u++;
      }
    int ma = p[1];
    for (int i = 1; i <= n; i++) {
      ma = max(ma, p[i]);
      if (ma != q[i]) flag = 1;
    }
    if (flag == 0) {
      for (int i = 1; i <= n; i++) cout << p[i] << " ";
    } else
      cout << -1;
    cout << endl;
  }
  return 0;
}
