#include <bits/stdc++.h>
void codeforces_1227b() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    static int array[100001];
    static int mark[100001];
    static int aws[100001];
    int count = 0, flag = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &array[i]);
      mark[i] = 0;
    }
    for (int i = 1; i <= n; i++) {
      if (array[i] > array[i - 1]) {
        aws[i] = array[i];
        mark[array[i]] = 1;
      } else {
        while (++count <= array[i]) {
          if (mark[count] == 0) {
            aws[i] = count;
            break;
          }
        }
        if (count > array[i]) {
          flag = 1;
          break;
        }
      }
    }
    if (flag) {
      printf("%d ", -1);
    } else {
      for (int i = 1; i <= n; i++) {
        printf("%d ", aws[i]);
      }
    }
    printf("\n");
    ;
  }
}
int main() {
  codeforces_1227b();
  return 0;
}
