Problem: You are given one integer n (n > 1).

Recall that a permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2, 3, 1, 5, 4] is a permutation of length 5, but [1, 2, 2] is not a permutation (2 appears twice in the array) and [1, 3, 4] is also not a permutation (n = 3 but there is 4 in the array).

Your task is to find a permutation p of length n that there is no index i (1 ≤ i ≤ n) such that p_i = i (so, for all i from 1 to n the condition p_i ≠ i should be satisfied).

You have to answer t independent test cases.

If there are several answers, you can print any. It can be proven that the answer exists for each n > 1.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 100) — the number of test cases. Then t test cases follow.

The only line of the test case contains one integer n (2 ≤ n ≤ 100) — the length of the permutation you have to find.

Output

For each test case, print n distinct integers p_1, p_2, …, p_n — a permutation that there is no index i (1 ≤ i ≤ n) such that p_i = i (so, for all i from 1 to n the condition p_i ≠ i should be satisfied).

If there are several answers, you can print any. It can be proven that the answer exists for each n > 1.

Example

Input


2
2
5


Output


2 1
2 1 5 3 4

Solution (in JAVA):

Solution:
// Working program using Reader Class 
import java.io.DataInputStream; 
import java.io.FileInputStream; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.Scanner; 
import java.util.StringTokenizer; 

public class Ideal 
{
public static void printLn(String x) { System.out.println(x); }  public static void printSp(String x) { System.out.print(x+" "); }  public static void print(String x) { System.out.print(x); }        
static Reader s;

        static class Reader 
        { 
                final private int BUFFER_SIZE = 1 << 16; 
                private DataInputStream din; 
                private byte[] buffer; 
                private int bufferPointer, bytesRead; 

                public Reader() 
                { 
                        din = new DataInputStream(System.in); 
                        buffer = new byte[BUFFER_SIZE]; 
                        bufferPointer = bytesRead = 0; 
                } 

                public Reader(String file_name) throws IOException 
                { 
                        din = new DataInputStream(new FileInputStream(file_name)); 
                        buffer = new byte[BUFFER_SIZE]; 
                        bufferPointer = bytesRead = 0; 
                } 

                public String readLine() throws IOException 
                { 
                        byte[] buf = new byte[64]; // line length 
                        int cnt = 0, c; 
                        while ((c = read()) != -1) 
                        { 
                                if (c == '\n') 
                                        break; 
                                buf[cnt++] = (byte) c; 
                        } 
                        return new String(buf, 0, cnt); 
                } 

                public int nextInt() throws IOException 
                { 
                        int ret = 0; 
                        byte c = read(); 
                        while (c <= ' ') 
                                c = read(); 
                        boolean neg = (c == '-'); 
                        if (neg) 
                                c = read(); 
                        do
                        { 
                                ret = ret * 10 + c - '0'; 
                        } while ((c = read()) >= '0' && c <= '9'); 

                        if (neg) 
                                return -ret; 
                        return ret; 
                } 

                public long nextLong() throws IOException 
                { 
                        long ret = 0; 
                        byte c = read(); 
                        while (c <= ' ') 
                                c = read(); 
                        boolean neg = (c == '-'); 
                        if (neg) 
                                c = read(); 
                        do { 
                                ret = ret * 10 + c - '0'; 
                        } 
                        while ((c = read()) >= '0' && c <= '9'); 
                        if (neg) 
                                return -ret; 
                        return ret; 
                } 

                public double nextDouble() throws IOException 
                { 
                        double ret = 0, div = 1; 
                        byte c = read(); 
                        while (c <= ' ') 
                                c = read(); 
                        boolean neg = (c == '-'); 
                        if (neg) 
                                c = read(); 

                        do { 
                                ret = ret * 10 + c - '0'; 
                        } 
                        while ((c = read()) >= '0' && c <= '9'); 

                        if (c == '.') 
                        { 
                                while ((c = read()) >= '0' && c <= '9') 
                                { 
                                        ret += (c - '0') / (div *= 10); 
                                } 
                        } 

                        if (neg) 
                                return -ret; 
                        return ret; 
                } 

                private void fillBuffer() throws IOException 
                { 
                        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); 
                        if (bytesRead == -1) 
                                buffer[0] = -1; 
                } 

                private byte read() throws IOException 
                { 
                        if (bufferPointer == bytesRead) 
                                fillBuffer(); 
                        return buffer[bufferPointer++]; 
                } 

                public void close() throws IOException 
                { 
                        if (din == null) 
                                return; 
                        din.close(); 
                } 
        } 

        public static void main(String[] args) throws IOException 
        { 
                s=new Reader(); 
                int t = s.nextInt(); 
                while (t-- > 0) 
                { 
                        solve();
                } 
        } 
        
        public static void solve() throws IOException 
        {
                // printLn("HelloTemplate");
                int n = s.nextInt();
                if(n%2 == 0)
                for(int i=n; i>=1 ; i--){
                        printSp(String.valueOf(i));
                }
                else{
                     for(int i=n; i>=1 ; i--){
                        if(i == n/2)
                                printSp(String.valueOf(i+1));
                        else if(i == (n/2)+1)
                                printSp(String.valueOf(i-1));
                        else  printSp(String.valueOf(i));

                     }    
                }


        }



}