#include <bits/stdc++.h>
using namespace std;
long long ipow(long long base, long long exp) {
  long long result = 1;
  for (;;) {
    if (exp & 1) result = (result * base) % 1000000007;
    exp >>= 1;
    if (!exp) break;
    base = (base * base) % 1000000007;
  }
  return result;
}
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
long long fact(long long n) {
  if (n >= 1000000007) return 0;
  long long result = 1;
  for (int i = 1; i <= n; i++) result = (result * i) % 1000000007;
  return result;
}
bool is_prime(long long n) {
  if (n == 1) {
    return false;
  }
  long long i = 2;
  while (i * i <= n) {
    if (n % i == 0) {
      return false;
    }
    i += 1;
  }
  return true;
}
bool areRotations(string str1, string str2) {
  if (str1.length() != str2.length()) return false;
  string temp = str1 + str1;
  return (temp.find(str2) != string::npos);
}
bool pow2(long long x) { return x && (!(x & (x - 1))); }
long long maxXorSum(long long n, long long k) {
  if (k == 1) return n;
  long long res = 1;
  while (res <= n) res <<= 1;
  return res - 1;
}
long long mcost(long long a[], long long n) {
  long long y;
  if (n % 2 == 1)
    y = a[n / 2];
  else
    y = (a[n / 2] + a[(n - 2) / 2]) / 2;
  long long s = 0;
  for (long long i = 0; i < n; i++) s += abs(a[i] - y);
  return s;
}
long long largest_subarray(long long a[], long long n) {
  unordered_map<long long, long long> index;
  long long ans = 0;
  for (long long i = 0, j = 0; i < n; i++) {
    j = max(index[a[i]], j);
    ans = max(ans, i - j + 1);
    index[a[i]] = i + 1;
  }
  return ans;
}
long long b[101], sz;
pair<long long, long long> adj[101];
void dfs(int s) {
  b[s] = 1;
  for (int i = 1; i <= sz; i++) {
    if (!b[i] &&
        (adj[s].first == adj[i].first || adj[s].second == adj[i].second))
      dfs(i);
  }
}
void display(int a[], int n) {
  for (int i = 0; i < n; i++) {
    cout << a[i] << "  ";
  }
  cout << endl;
}
void per(int a[], int n) {
  long long d = 0;
  sort(a, a + n);
  do {
    long long s = 0, x = 1;
    for (long long i = 0; i < n; i++) {
      s += a[i];
      if (s == 0) {
        x = -1;
      }
    }
    if (x == 1) {
      cout << "YES" << endl;
      d = 1;
      for (long long i = 0; i < n; i++) {
        cout << a[i] << " ";
      }
      cout << endl;
      break;
    }
  } while (next_permutation(a, a + n));
  if (d == 0) {
    cout << "NO" << endl;
  }
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
bool leftRotate(int a[], int d, int n) {
  d = d % n;
  int g_c_d = gcd(d, n);
  for (int i = 0; i < g_c_d; i++) {
    int temp = a[i];
    int j = i;
    while (1) {
      int k = j + d;
      if (k >= n) k = k - n;
      if (k == i) break;
      a[j] = a[k];
      j = k;
    }
    a[j] = temp;
  }
  long long s = 0, x = 1;
  for (long long i = 0; i < n; i++) {
    s += a[i];
    if (s == 0) {
      x = 0;
    }
  }
  if (x == 1) {
    cout << "YES" << endl;
    for (long long i = 0; i < n; i++) {
      cout << a[i] << " ";
    }
    cout << endl;
    return true;
  }
  return false;
}
long long rec(long long n, long long k) {
  if (n == 1) {
    return 1;
  }
  if (k == 1) {
    return n;
  }
  return ((n + rec(n - 1, k - 1)) % 1000000007);
}
bool isPerfectSquare(long long x) {
  if (sqrt(x) * sqrt(x) == x) {
    return true;
  }
  return false;
}
bool isSubSequence(string str1, string str2, int m, int n) {
  int j = 0, x = 0, d = 0;
  if (str1[0] == str2[0]) {
    for (int i = 0; i < n && j < m; i++) {
      if (str1[j] == str2[i]) {
        j++;
      } else {
        d = i;
        break;
      }
    }
    if (j == m) {
      return true;
    }
    long long p = 9, v = 0;
    for (int i = n - 1; i >= d; i--) {
      if (v == 10 - j) {
        break;
      }
      if (str1[p] == str2[i]) {
        p--;
        v++;
      } else {
        break;
      }
    }
    if (v + j == 10) {
      return true;
    } else {
      return false;
    }
  } else {
    size_t found = str2.find(str1);
    if (found != string::npos && str1[9] == str2[n - 1]) {
      return true;
    } else {
      return false;
    }
  }
}
void computeLPSArray(string pat, int M, int lps[]) {
  int len = 0;
  int i = 1;
  lps[0] = 0;
  while (i < M) {
    if (pat[i] == pat[len]) {
      len++;
      lps[i] = len;
      i++;
    } else {
      if (len != 0) {
        len = lps[len - 1];
      } else {
        lps[i] = len;
        i++;
      }
    }
  }
}
int KMPSearch(string pat, string txt) {
  int M = pat.length();
  int N = txt.length();
  int lps[M];
  int j = 0;
  computeLPSArray(pat, M, lps);
  int i = 0;
  int res = 0;
  int next_i = 0;
  while (i < N) {
    if (pat[j] == txt[i]) {
      j++;
      i++;
    }
    if (j == M) {
      j = lps[j - 1];
      res++;
      if (lps[j] != 0) i = ++next_i;
      j = 0;
    } else if (i < N && pat[j] != txt[i]) {
      if (j != 0)
        j = lps[j - 1];
      else
        i = i + 1;
    }
  }
  return res;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n;
    long long arr[n];
    for (long long i = 0; i < n; i++) {
      cin >> arr[i];
    }
    set<long long> st;
    for (long long i = 1; i < n + 1; i++) st.insert(i);
    vector<long long> ans;
    long long flag = 0;
    for (long long i = 0; i < n; i++) {
      auto it = st.lower_bound(arr[i] + 1);
      if (it == st.begin())
        flag = 1;
      else
        --it;
      ans.push_back(*it);
      st.erase(it);
    }
    if (flag) {
      cout << -1;
    } else {
      for (long long i = 0; i < n; i++) {
        cout << ans[i] << " ";
      }
    }
    cout << endl;
  }
  return 0;
}
