#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5;
int arr[MAXN], ans[MAXN];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    ans[0] = arr[0];
    set<int> taken;
    taken.insert(ans[0]);
    int val = 1, parent = ans[0];
    bool bad = false;
    for (int i = 1; i < n; i++) {
      if (arr[i] > arr[i - 1]) {
        ans[i] = arr[i];
        taken.insert(arr[i]);
        parent = arr[i];
      } else {
        while (taken.count(val)) {
          val++;
        }
        if (val > parent) {
          bad = true;
          break;
        } else {
          ans[i] = val;
          taken.insert(val);
        }
      }
    }
    if (bad) {
      cout << -1 << endl;
    } else {
      for (int i = 0; i < n; i++) {
        cout << ans[i] << ' ';
      }
      cout << endl;
    }
  }
}
