#include <bits/stdc++.h>
using namespace std;
int a[100100];
bool vis[100100];
int v[100100];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    memset(vis, 0, sizeof vis);
    int maxx = 0;
    bool flag = false;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      maxx = max(a[i], maxx);
      if (a[i] < maxx) flag = true;
    }
    if (flag) {
      cout << -1 << endl;
      continue;
    }
    v[0] = 0;
    int mx = 0, l = 1;
    for (int i = 1; i <= n; i++) {
      if (a[i] > mx) {
        v[i] = a[i];
        vis[a[i]] = 1;
        mx = a[i];
      } else {
        while (vis[l] && l < mx) l++;
        if (l == mx) {
          cout << -1 << endl;
          flag = true;
          break;
        }
        vis[l] = 1;
        v[i] = l;
      }
    }
    if (!flag) {
      for (int i = 1; i <= n; i++) cout << v[i] << " ";
      cout << endl;
    }
  }
  return 0;
}
