P. PELODE
time limit per test
1 second
memory limit per test
512 megabytes
input
standard input
output
standard output

Litusiano was reading a book called Rich Dad Poor Dad when he came across the following problem:

You are given an integer $$$n$$$ and an array $$$a$$$ of length $$$n$$$. Your task is to find a permutation $$$p$$$ of length $$$n$$$ (i.e., an arrangement of the numbers from $$$1$$$ to $$$n$$$) that satisfies the following conditions:

1. For every index $$$i$$$ ($$$1 \leq i \leq n$$$): - Let $$$a_i$$$ be the smallest index greater than $$$i$$$ ($$$i \lt a_i \leq n$$$) such that $$$p_i \lt p_{a_i}$$$, or $$$a_i = -1$$$ if no such index exists. 2. The permutation $$$p$$$ must be the lexicographically smallest one that satisfies this property, or it must be determined that no such permutation exists.

Note on lexicographical order:

Lexicographical order (or lexicographically smallest) means that, given two arrays $$$x$$$ and $$$y$$$ of the same length, $$$x$$$ is smaller than $$$y$$$ in this order if at the first position $$$k$$$ where they differ, $$$x_k \lt y_k$$$. For example: - $$$[1, 2, 3]$$$ is smaller than $$$[1, 3, 2]$$$ because at the second position, $$$2 \lt 3$$$. - $$$[2, 1, 3]$$$ is greater than $$$[1, 3, 2]$$$ because at the first position, $$$2 \gt 1$$$.

If no permutation satisfying the given property exists, it should be explicitly stated.

Input

Each test contains multiple test cases. The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 2024$$$) — the number of test cases. The description of the test cases follows.

For each test case:

- The first line contains a single integer $$$n$$$ ($$$1 \leq n \leq 69 \cdot 10^4$$$) — the length of the array $$$a$$$ and the permutation $$$p$$$. - The second line contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$-1 \leq a_i \leq n$$$) — the elements of the array $$$a$$$.

It is guaranteed that the sum of $$$n$$$ across all test cases does not exceed $$$69 \cdot 10^4$$$.

Output

For each test case, output the lexicographically smallest permutation that satisfies all the conditions or print "No hay PELODE :(", without the quotes, if such a permutation does not exist.

Example
Input
2
5
-1 5 4 5 -1
5
-1 4 5 5 -1
Output
5 3 1 2 4 
No hay PELODE :(