#include <bits/stdc++.h>
using namespace std;
long long Ceil(long long a, long long b) {
  if (a % b == 0)
    return a / b;
  else
    return a / b + 1;
}
bool isSubSequence(string str1, string str2, int m, int n) {
  if (m == 0) return true;
  if (n == 0) return false;
  if (str1[m - 1] == str2[n - 1])
    return isSubSequence(str1, str2, m - 1, n - 1);
  return isSubSequence(str1, str2, m, n - 1);
}
void solve() {
  long long n;
  cin >> n;
  long long q[n];
  for (long long i = 0; i < n; i++) cin >> q[i];
  long long p[n];
  map<long long, long long> m;
  deque<long long> v;
  for (long long i = 0; i < n; i++) {
    m[q[i]] = 1;
  }
  for (long long i = 1; i <= n; i++) {
    if (!m[i]) v.push_back(i);
  }
  p[0] = q[0];
  for (long long i = 1; i < n; i++) {
    if (q[i] != q[i - 1])
      p[i] = q[i];
    else {
      if (v.empty() or v.front() > q[i]) {
        cout << "-1" << endl;
        return;
      }
      p[i] = v.front();
      v.pop_front();
    }
  }
  for (long long i = 0; i < n; i++) cout << p[i] << " ";
  cout << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
