There are $N$ boxes numbered from $1$ to $N$, and $N$ balls numbered from $1$ to $N$.
You have assigned Snuke the following **procedure** as homework.
* Put each ball into any box he likes. Multiple balls can be placed in the same box, and there can be boxes without balls.
* For $i = 1, 2, \cdots, N$ in this order, perform the following operations.
* If box $i$ contains no balls, do nothing.
* If box $i$ contains balls, take all of them out and arrange them in a line **in any order he likes**. Let $k$ be the number of balls taken out, and $(x_1, x_2, \cdots, x_k)$ be the ball numbers in the line. For each $1 \leq j \leq k$, put ball $x_j$ into box $x_{j+1}$. Here, $x_{k+1}$ means $x_1$. All these operations of putting balls into boxes happen simultaneously.
He claims that he has completed the homework and reports the final state to you. Specifically, he says that ball $i$ is in box $A_i$ after the procedure.
You doubt whether he has correctly performed the procedure. Determine whether the state he reported is a possible result of the procedure.
There are $T$ test cases for each input.
## Constraints
* $1 \leq T \leq 250000$
* $1 \leq N \leq 250000$
* $1 \leq A_i \leq N$
* The sum of $N$ over all test cases in each input is at most $250000$.
* All input values are integers.
## Input
The input is given from Standard Input in the following format:
$T$
$case_1$
$case_2$
$\vdots$
$case_T$
Each test case is given in the following format:
$N$
$A_1$ $A_2$ $\cdots$ $A_N$
[samples]