#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, w, e, r, t, n, m, first, s;
  vector<int> a, b(100001), c(100001);
  vector<vector<int> > d(10001);
  cin >> t;
  for (q = 1; q <= t; q++) {
    r = 0;
    cin >> n;
    a.clear();
    for (w = 0; w <= n; w++) b[w] = c[w] = 0;
    for (w = 0; w < n; w++) cin >> e, a.push_back(e);
    for (w = 0; w < n - 1; w++)
      if (a[w] < a[w + 1]) b[w + 1] = a[w + 1], c[a[w + 1]] = 1;
    first = 1;
    b[0] = a[0];
    c[a[0]] = 1;
    for (w = 0; w < n; w++)
      if (b[w] == 0) {
        for (e = first; c[e] == 1; e++) {
        }
        b[w] = e;
        c[e] = 1;
        first = e;
        if (b[w] > a[w]) r = 1;
      }
    if (r == 0)
      for (w = 0; w < n; w++) d[q].push_back(b[w]);
    else
      d[q].push_back(-1);
  }
  for (w = 1; w <= t; w++) {
    for (e = 0; e < d[w].size(); e++) cout << d[w][e] << ' ';
    cout << endl;
  }
  return 0;
}
