Array

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

Koishi gives you an integer array BB of length nn satisfying 1B_1B_2B_nn+11 \leq B\_1 \leq B\_2 \leq \ldots \leq B\_n \leq n + 1.

Let S(T)S(T) denote the set of numbers that appear in array TT. Koishi asks you whether an array AA of length nn exists such that, for any ll and rr such that 1lrn1 \leq l \leq r \leq n, the equality S(A\[l,r])=S(A\[1,n])S(A\[l,r]) = S(A\[1,n]) holds if and only if rB_lr \ge B\_l. If so, please construct an array AA that satisfies the condition above.

Here, A\[l,r]A\[l,r] represents the sub-array of AA formed by A_l,A_l+1,,A_rA\_l, A\_{l+1}, \ldots, A\_{r}.

You can only use integers from 00 to 10910^9 in the array. It can be shown that, if a solution exists, then there also exists a solution satisfying this condition.

Notice: If there exists such an index ii (1in1 \leq i \leq n) that B_i<iB\_i < i holds, the required AA must not exist.

입력

The first line contains an integer TT (1T61041 \leq T \leq 6 \cdot 10^4), the number of test cases. Then TT test cases follow.

The first line of each test case contains an integer nn (1n21051 \leq n \leq 2 \cdot 10^5), the length of array BB (and AA).

The next line contains nn integers B_1,B_2,,B_nB\_1, B\_2, \ldots, B\_n (1B_1B_2B_nn+11 \leq B\_1 \leq B\_2 \leq \ldots \leq B\_n \leq n + 1), the array that Koishi gives you.

It is guaranteed that n2.6106\sum n \leq 2.6 \cdot 10^6.

출력

For each test case, print one line. If such an array AA doesn't exist, output 1-1. Otherwise, you should output nn numbers: the array AA consisting of integers in the range from 00 to 10910^9. If there are several possible solutions, print any one of them.