#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<int> in;
  bool a[n + 2];
  a[n + 1] = true;
  bool check = true;
  for (int i = 1; i <= n; i++) a[i] = true;
  int ff = 1;
  for (int i = 0; i < n; i++) {
    int tmp;
    cin >> tmp;
    in.push_back(tmp);
    a[tmp] = false;
  }
  for (int i = 1; i < n; i++) {
    if (in[i - 1] > in[i]) {
      check = false;
    }
  }
  if (check) {
    vector<int> res;
    res.push_back(in[0]);
    for (int i = 1; i < n; i++) {
      if (res[i - 1] > in[i]) {
        cout << -1 << endl;
        return;
      }
      if (in[i] > in[i - 1]) {
        res.push_back(in[i]);
      } else {
        while (a[ff] == false) {
          ff++;
        }
        if (ff == n + 1) {
          cout << -1 << endl;
          return;
        }
        if (ff > in[i]) {
          cout << -1 << endl;
          return;
        }
        res.push_back(ff++);
      }
    }
    for (auto a : res) {
      cout << a << " ";
    }
    cout << endl;
    return;
  } else {
    cout << -1;
    return;
  }
}
int main() {
  long long t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
