#include <bits/stdc++.h>
using namespace std;
int min_not_used(pair<vector<bool>, int>& v) {
  for (int i = (v.second + 1); i < (v.first.size()); ++i) {
    if (!v.first[i]) return i;
  }
  return -1;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t, n, a;
  vector<int> q, p;
  pair<vector<bool>, int> used;
  cin >> t;
  for (int o = 0; o < (t); ++o) {
    bool b = true;
    cin >> n;
    q.resize(n);
    p.resize(n);
    used.first.resize(n + 1, false);
    cin >> q[0];
    p[0] = q[0];
    used.first[p[0]] = true;
    used.second = (p[0] == 1 ? 2 : 1);
    for (int i = 0; i < (n - 1); ++i) {
      cin >> q[i + 1];
      p[i + 1] = (q[i + 1] == q[i] ? used.second : q[i + 1]);
      used.first[p[i + 1]] = true;
      if (p[i + 1] == used.second) used.second = min_not_used(used);
      if (p[i + 1] == -1) {
        cout << -1;
        b = false;
        break;
      }
    }
    a = 0;
    if (b) {
      for (int i = 0; i < (n); ++i) {
        a = max(a, p[i]);
        if (a != q[i]) {
          cout << -1;
          b = false;
          break;
        }
      }
      if (b) {
        for (int i = 0; i < (n); ++i) cout << p[i] << ' ';
      }
    }
    cout << '\n';
    used.first.clear();
  }
  return 0;
}
