#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int k = 0; k < t; ++k) {
    int n;
    int la = 0;
    int f = 0;
    cin >> n;
    vector<int> a(n, 0);
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
    }
    vector<int> ans(n, 0);
    ans[0] = a[0];
    vector<int> c(n, 0);
    c[a[0] - 1] += 1;
    for (int i = 1; i < n; ++i) {
      if (a[i] > a[i - 1]) {
        ans[i] = a[i];
        ++c[a[i] - 1];
      } else {
        if (a[i] == a[i - 1]) {
          f = 1;
          for (int j = la; j >= 0, j < a[i]; ++j) {
            if (c[j] == 0) {
              f = 0;
              c[j] += 1;
              ans[i] = j + 1;
              la = j + 1;
              break;
            } else {
              la += 1;
            }
          }
          if (f == 1) {
            break;
          }
        } else {
          f = 1;
          break;
        }
      }
    }
    if (f == 0) {
      for (int i = 0; i < n; ++i) {
        cout << ans[i] << ' ';
      }
      cout << '\n';
    } else {
      cout << -1 << '\n';
    }
  }
  return 0;
}
