#include <bits/stdc++.h>
using namespace std;
int q[100010];
int p[100010];
int ans[100010];
int main() {
  int t, n;
  cin >> t;
  while (t--) {
    memset(p, 0, sizeof(p));
    cin >> n;
    bool flag = true;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &q[i]);
    }
    for (int i = 1; i <= n; i++) {
      if (q[i] < q[i - 1] || q[i] < i) {
        flag = false;
      }
      p[q[i]] = 1;
    }
    if (!flag) {
      cout << -1 << endl;
    } else {
      queue<int> temp;
      for (int i = 1; i <= n; i++) {
        if (!p[i]) {
          temp.push(i);
        }
      }
      for (int i = 1; i <= n; i++) {
        if (q[i] > q[i - 1]) {
          ans[i] = q[i];
        } else if (q[i] == q[i - 1]) {
          ans[i] = temp.front();
          temp.pop();
        }
      }
      for (int i = 1; i <= n; i++) {
        cout << ans[i] << " ";
      }
      cout << endl;
    }
  }
}
