#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    vector<int> v(n);
    vector<bool> b(n + 1, 0);
    for (int j = 0; j < n; j++) cin >> v[j];
    int k = 1;
    vector<int> ans(n);
    bool flag = 0;
    for (int j = 0; j < n; j++) {
      if (b[v[j]]) {
        while (b[k]) k++;
        if (k > v[j]) {
          flag = 1;
          break;
        }
        ans[j] = k;
        b[k] = 1;
      } else {
        ans[j] = v[j];
        b[v[j]] = 1;
      }
    }
    if (flag)
      cout << -1;
    else {
      for (int j = 0; j < n; j++) cout << ans[j] << " ";
    }
    cout << endl;
  }
}
