Order

No attempts yetTime limit1sMemory limit128 MB

Problem

There is a sequence S=(s1,s2,,sn)S = (s_1, s_2, \dots, s_n) made up of nn distinct integers. It is a permutation that uses each integer from 11 to nn exactly once, so sisjs_i \ne s_j for every iji \ne j and 1sin1 \le s_i \le n.

From SS we can build a new sequence R=(r1,r2,,rn)R = (r_1, r_2, \dots, r_n), where rir_i is the number of elements among those that come before sis_i, namely {s1,s2,,si1}\{s_1, s_2, \dots, s_{i-1}\}, that are smaller than sis_i.

For example, if n=10n = 10 and S=(6,4,3,5,1,2,7,8,9,10)S = (6, 4, 3, 5, 1, 2, 7, 8, 9, 10), then R=(0,0,0,2,0,1,6,7,8,9)R = (0, 0, 0, 2, 0, 1, 6, 7, 8, 9).

Given a sequence RR, write a program that recovers the original sequence SS. If an SS corresponding to RR exists, it is uniquely determined, but for some inputs no such SS exists. For example, if n=5n = 5 and R=(0,2,2,0,1)R = (0, 2, 2, 0, 1), then no SS corresponds to this RR.

Input

Input is read from standard input. The first line contains the number of test cases TT. Each test case consists of two lines: the first line contains the length of the sequence nn (1n1001 \le n \le 100), and the second line contains the nn integers r1,r2,,rnr_1, r_2, \dots, r_n of the sequence RR, separated by spaces.

Output

For each test case, print the sequence SS corresponding to the given RR on one line, with its numbers separated by spaces. If SS cannot be recovered from RR, print IMPOSSIBLE on that line instead.