#include <bits/stdc++.h>
using namespace std;
bool used[100005];
int main() {
  ios::sync_with_stdio(0);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, i, j = 1, k, ch, a, b, pred = -1, br = 0;
    cin >> n;
    vector<int> ma(n);
    vector<int> ans;
    for (i = 0; i < n; i++) cin >> ma[i];
    for (i = 0; i <= n; i++) used[i] = 0;
    for (i = 0; i < n; i++) {
      a = ma[i];
      if (a > pred) {
        used[a] = 1;
        ans.push_back(a);
        pred = a;
      } else {
        while (used[j]) j++;
        if (j > pred) {
          br = 1;
          cout << -1 << endl;
          break;
        }
        used[j] = 1;
        ans.push_back(j);
      }
    }
    if (br == 0) {
      for (auto c : ans) cout << c << " ";
      cout << endl;
    }
  }
  return 0;
}
