#include <bits/stdc++.h>
using namespace std;
int MOD = 1e18 + 7;
long double EPS = 1e-12;
signed main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    vector<int> ans(n, -1);
    vector<bool> ch(n + 5, 0);
    int now = -1e9;
    vector<int> mxs(n);
    for (auto &j : mxs) cin >> j;
    bool stop = 0;
    for (int j = 0; j < n; j++) {
      int mx;
      mx = mxs[j];
      if (mx > now) {
        now = mx;
        ans[j] = mx;
        ch[mx] = 1;
      } else if (mx < now) {
        cout << -1 << endl;
        stop = 1;
        break;
      }
    }
    if (stop) continue;
    queue<int> q;
    for (int j = 1; j <= n; j++) {
      if (!ch[j]) q.push(j);
    }
    int cur = -1e9;
    for (int j = 0; j < n; j++) {
      if (ans[j] == -1) {
        ans[j] = q.front();
        q.pop();
        cur = max(cur, ans[j]);
      } else {
        cur = max(cur, ans[j]);
      }
      if (cur != mxs[j]) {
        cout << -1 << endl;
        stop = 1;
        break;
      }
    }
    if (stop) continue;
    for (auto j : ans) {
      cout << j << " ";
    }
    cout << endl;
  }
}
