#include <bits/stdc++.h>
using namespace std;
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base ::sync_with_stdio(0);
  long long t;
  cin >> t;
  for (long long i = 0; i < t; i++) {
    long long n;
    cin >> n;
    long long a[n];
    long long ans[n];
    bool used[n + 1];
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
      ans[i] = 0;
      used[i + 1] = false;
    }
    ans[0] = a[0];
    used[a[0]] = true;
    for (long long i = 1; i < n; i++) {
      if (a[i] != a[i - 1]) {
        ans[i] = a[i];
        used[a[i]] = true;
      }
    }
    long long num = 1;
    long long last = ans[0];
    bool f = false;
    for (long long i = 1; i < n; i++) {
      if (ans[i] == 0) {
        while (num < last && used[num]) {
          num++;
        }
        if (num >= last) {
          f = true;
          cout << -1 << '\n';
          break;
        }
        ans[i] = num;
      } else {
        last = ans[i];
      }
      used[ans[i]] = true;
    }
    if (f) {
      continue;
    }
    for (long long i = 0; i < n; i++) {
      cout << ans[i] << ' ';
    }
    cout << '\n';
  }
  return 0;
}
