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:
import java.io.*;
import java.util.*;

public class CodeChef2 {
	
    
	static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        {
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    }
	
    
    public static void main(String[] args) throws Exception {
        FastReader sc=new FastReader();
        BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
        
		
        int t=sc.nextInt();
        long M=1000000007l;
        
        outer:while(t-- > 0) {
        	
        	int n=sc.nextInt();
        	
        	int[] arr=new int[n];
        	
        	for(int i=0;i<n;i++) {
        		arr[i]=i+1;
        	}
        	
        	for(int i=1;i<n;i++) {
        		int temp=arr[i-1];
        		arr[i-1]=arr[i];
        		arr[i]=temp;
        	}
        	arr[0]=2;
        	
        	for(int i=0;i<n;i++) {
        		bw.append(arr[i]+" ");
        	}
        	bw.append("\n");
        }
        bw.close();
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    static ArrayList<Integer> getDivisor(int n){
    	ArrayList<Integer> div=new ArrayList<>();
    	
        for (int i=1; i<=Math.sqrt(n); i++) 
        { 
            if (n%i==0) 
            { 
                if (n/i == i) 
                    div.add(i); 
                else { 
                    div.add(i);
                    div.add(n/i);
                }
            } 
        }
        
        return div;
    }
    static int gcd(int a,int b) {
    	return b==0?a:gcd(b,a%b);
    }
    
	static int MAXN = 1000001;
	static int[] spf=new int[MAXN];
	
    static void sieveSmallestFactor() 
    { 
        spf[1] = 1;
        
        for (int i=2; i<MAXN; i++) 
        	spf[i] = i;
        
        for (int i=4; i<MAXN; i+=2) 
            spf[i] = 2; 
       
        
        for (int i=3; i*i<MAXN; i++) 
        { 
            if (spf[i] == i) 
            { 
                for (int j=i*i; j<MAXN; j+=i) 
                    if (spf[j]==j) 
                        spf[j] = i; 
            } 
        } 
    } 
    
    
	private static HashMap<Integer,Integer> PrimeFactorizationmap(int n) {
		int count=0;
		HashMap<Integer,Integer> factors=new HashMap<>();
		if(n==1) {
			System.out.print(1+"^"+1);
		}else {
			for(int i=2;i<=Math.sqrt(n);i++) {
				if(n%i==0) {
					count=0;
					while(n%i==0) {
						count++;
						n=n/i;
					}
					factors.put(i,count);
				
				}
			}
			if(n>1) {
				factors.put(n,1);
			}
		}
		return factors;
	}
	

    
    static HashMap<Integer,Integer> getprimeFactors(int n) 
    { 

        HashMap<Integer,Integer> ret = new HashMap<>();
        while (n > 1) 
        { 
        	if(ret.containsKey(spf[n])) {
        		ret.put(spf[n],ret.get(spf[n])+1);
        	}else {
        		ret.put(spf[(int) n],1);
        	}
            n = n / spf[n]; 
        }
        
        return ret; 
    }
    
    static ArrayList<Integer> getPrimeSieve(){
		int primesieve[]=new int[1000001];
		
		Arrays.fill(primesieve,0);
		
		for(int i=2;i*i<primesieve.length;i++) {
			if(primesieve[i]==0)	
				for(int j=i*i;j<primesieve.length;j+=i) {	
						primesieve[j]=1;
				}
		}
		
		ArrayList<Integer> prime=new ArrayList<>();
		for(int i=2;i<primesieve.length;i++) {
			if(primesieve[i]==0) {
				prime.add(i);
			}
		}
		return prime;
    }
    
    
    
    
	private static boolean checkPrimeRM(int n,int k) {
		if(n<=4) {
			return n==2||n==3;
		}
		
		int s=0,d=n-1;
		
		while((d&1) != 1) {
			d=d/2;
			s++;
		}
		
		for(int i=0;i<k;i++) {
			int a=2+(int)Math.random()*(n-4);
			if(isComposite(a,s,d,n)) {
				return false;
			}
		}

		return true;
	}

	private static boolean isComposite(int a, int s, int d, int n) {
		int x=power(a,d,n);
		
		if(x==1 || x==n-1) {
			return false;
		}
		
		for(int i=0;i<s;i++){
			if(x%(n-1)==0) {
				return false;
			}
			x=(x*x)%n;
		}
		
		return true;
	}

	private static int power(int a, int b,int n) {
		int res=1;
		while(b != 0) {
			if((b&1)==1) {
				res=(res*a)%n;
			}
			b>>=1;
			a=(a*a)%n;
		}
		return res;
	}
    
    public static HashSet<Long> getPrimeLtoR(int l,int r,List<Integer> prime) {
		if(l==1) l++;
		
		int[] arr=new int[r-l+1];
		
		Arrays.fill(arr,0);
		
		for(int i: prime ){

			if(i*i<=r) {
				
				int j=(l/i)*i;
				if(j<l) 
					j+=i;
				for(;j<=r;j+=i) {
					if(j!=i)
						arr[j-l]=1;
				}
			}else {
				break;
			}
			
		}
		
		HashSet<Long> primeLtoR=new HashSet<>();
		
		for(int i=0;i<arr.length;i++) {
			if(arr[i]==0) {
				primeLtoR.add((i+l+0l));
			}
		}
		return primeLtoR;
	}
}