#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> vis(n + 1, 0);
    vector<long long> res(n);
    vector<long long> v;
    int b;
    cin >> b;
    v.push_back(b);
    int cur = 1;
    int ok = 1;
    vis[v[0]] = 1;
    res[0] = v[0];
    for (int i = 1, a; i < n; i++) {
      cin >> a;
      v.push_back(a);
      if (!ok) continue;
      if (v[i] > v[i - 1]) {
        vis[v[i]] = 1;
        vis[v[i - 1]] = 1;
        res[i] = v[i];
        continue;
      } else {
        for (int j = cur; j < v[i]; j++) {
          if (vis[j] == 0) {
            vis[j] = 1;
            res[i] = j;
            cur = j + 1;
            break;
          }
        }
        if (res[i] == 0) {
          ok = 0;
        }
      }
    }
    if (!ok)
      cout << -1 << endl;
    else {
      for (int i = 0; i < res.size(); i++)
        if (res[i] == 0)
          cout << v[i] << " ";
        else
          cout << res[i] << " ";
      cout << endl;
    }
  }
}
