#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int q[N], p[N], used[N];
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%d", &q[i]);
    int maxn = 0;
    memset(p, 0, sizeof(p));
    memset(used, 0, sizeof(used));
    for (int i = 1; i <= n; i++)
      if (q[i] > maxn) p[i] = q[i], maxn = q[i], used[q[i]] = 1;
    int j = 1;
    bool flag = 1;
    for (int i = 1; i <= n; i++) {
      while (used[j]) j++;
      if (!p[i]) p[i] = j, j++;
      if (p[i] > q[i]) {
        flag = 0;
        break;
      }
    }
    if (flag)
      for (int i = 1; i <= n; i++) printf("%d ", p[i]);
    else
      printf("-1");
    printf("\n");
  }
}
