#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int q[n], ans[n], freq[100002];
    fill(ans, ans + n, -1);
    fill(freq, freq + 100002, -1);
    for (int i = 0; i < n; i++) {
      cin >> q[i];
      freq[q[i]] = 1;
    }
    ans[0] = q[0];
    for (int i = 1; i < n; i++) {
      if (q[i] != q[i - 1]) ans[i] = q[i];
    }
    vector<int> v;
    for (int i = 1; i <= n; i++) {
      if (freq[i] == -1) v.push_back(i);
    }
    int c = 0;
    for (int i = 0; i < n; i++) {
      if (ans[i] == -1) {
        ans[i] = v[c];
        c++;
      }
    }
    int cq[n];
    bool flag = true;
    cq[0] = ans[0];
    for (int i = 1; i < n; i++) {
      cq[i] = max(ans[i], cq[i - 1]);
      if (cq[i] != q[i]) {
        flag = false;
        break;
      }
    }
    if (flag) {
      for (int i = 0; i < n; i++) cout << ans[i] << " ";
    } else
      cout << -1;
    cout << endl;
  }
  return 0;
}
