#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n + 1];
  int b[n + 1];
  bool c[n + 2];
  memset(c, 1, sizeof(c));
  int m = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    if (m != a[i]) {
      m = a[i];
      b[i] = m;
      c[m] = 0;
    }
  }
  vector<int> v;
  int p = 0;
  int j = 0;
  bool f = 1;
  for (int i = 1; i <= n; i++)
    if (c[i] == 1) v.push_back(i);
  for (int i = 0; i < n; i++) {
    if (b[i] != 0) {
      p = b[i];
    } else {
      b[i] = v[j++];
      if (b[i] >= p) {
        f = 0;
        break;
      }
    }
  }
  if (f) {
    for (int i = 0; i < n; i++) cout << b[i] << ' ';
  } else
    cout << "-1";
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int TestCase;
  cin >> TestCase;
  while (TestCase--) solve();
  return 0;
}
