#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    vector<int> a(n);
    for (int i = 0; (i) < (int)(n); (i)++) {
      scanf("%d", &a[i]);
    }
    queue<int> que;
    vector<int> ans;
    for (int i = 0; (i) < (int)(n); (i)++) {
      if (i == 0 || a[i - 1] < a[i]) {
        ans.push_back(a[i]);
        int prev = (i == 0 ? 0 : a[i - 1]);
        prev++;
        while (prev != a[i]) {
          que.push(prev);
          prev++;
        }
      } else {
        if (que.empty()) {
          printf("-1\n");
          goto end;
        }
        ans.push_back(que.front());
        que.pop();
      }
    }
    assert(ans.size() == n);
    for (int i = 0; (i) < (int)(n); (i)++) {
      printf("%d%c", ans[i], i == n - 1 ? '\n' : ' ');
    }
  end:;
  }
  return 0;
}
