Review that a change of length n is a cluster comprising of n unmistakable integers from 1 to n in discretionary request. For instance, [2,3,1,5,4] is a change of length 5, yet [1,2,2] isn't a stage (2 shows up twice in the exhibit) and [1,3,4] is additionally not a change (n=3 but rather there is 4 in the cluster). Your undertaking is to track
Correct answer will be upvoted else Multiple Downvoted. Computer science.
You are given one integer n (n>1).
Review that a change of length n is a cluster comprising of n unmistakable integers from 1 to n in discretionary request. For instance, [2,3,1,5,4] is a change of length 5, yet [1,2,2] isn't a stage (2 shows up twice in the exhibit) and [1,3,4] is additionally not a change (n=3 but rather there is 4 in the cluster).
Your undertaking is to track down a stage p of length n that there is no file I (1≤i≤n) to such an extent that pi=i (along these lines, for all I from 1 to n the condition pi≠i ought to be fulfilled).
You need to answer t autonomous experiments.
In case there are a few replies, you can print any. It tends to be demonstrated that the appropriate response exists for each n>1.
Input
The main line of the input contains one integer t (1≤t≤100) — the number of experiments. Then, at that point, t experiments follow.
The main line of the experiment contains one integer n (2≤n≤100) — the length of the stage you need to find.
Output
For each experiment, print n particular integers p1,p2,… ,pn — a stage that there is no list I (1≤i≤n) to such an extent that pi=i (along these lines, for all I from 1 to n the condition pi≠i ought to be fulfilled).
In case there are a few replies, you can print any. It very well may be demonstrated that the appropriate response exists for each n>1.

Step by step
Solved in 4 steps with 1 images









