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 CPP):

Solution:
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define PI 3.14159265 

ll mod = 1000000007;
ll z   = 1000000000;
const ll N   = 1e5+1;
const ll INF = 1e18;
// ll mod = 998244353;

 
#define mp                make_pair
#define pb                push_back
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define all(x)            (x).begin(),(x).end()
#define uniq(v)           (v).erase(unique(all(v)),(v).end())
#define sz(x)             (ll)((x).size())
#define fr                first
#define sc                second
#define pii               pair<ll,ll>
#define vi                vector<ll> 
#define vvi               vector<vector<ll>> 
#define vp                vector<pair<ll,ll>> 
#define rep(i,a,b)        for(ll i=a;i<b;i++)
#define repr(i,a,b)       for(ll i=b-1;i>=a;i--)
#define mem1(a)           memset(a,-1,sizeof(a))
#define mem0(a)           memset(a,0,sizeof(a))
#define ppc               __builtin_popcount
#define ppcll             __builtin_popcountll

template<typename T,typename T1>T amax(T &a,T1 b){if(b>a)a=b;return a;}
template<typename T,typename T1>T amin(T &a,T1 b){if(b<a)a=b;return a;}

#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

// ll euclideandis(ll a, ll b)
// {
// 	return sqrt(a*a + b*b);
// }
// ll sumofdigit(ll a){ll ans = 0;while(a){ans += a%10;a = a/10;}return ans;}

// bool cmp(const pair<ll,ll>& p1, const pair<ll,ll>& p2)
// {
// 	if(p1.first == p2.first)
// 	{
// 		return (p1.second > p2.second);
// 	}
// 	return (p1.first < p2.first);
// }

// int gcd(int a, int b) 
// { 
//     if (!a) 
//        return b; 
//     return gcd(b%a,a); 
// }

//////////////////////////////////////////////////////////////////////Factorial and inverse modulo calc//////////////////////////////
// vector<ll> fact(1000001,0);
// fact[0] = 1;
// for(int i=1;i<=1000000;i++)
//     fact[i] = (fact[i-1]*i)%mod;  
    
// vector<ll> inv(1000001,0);
// inv[0]=1;
// for(int i=1;i<=1000000;i++)
// {
//     inv[i]=(inv[i-1]*powe(i,mod-2))%mod;
// }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////exponential power calc////////////////////////////////////////
ll powe(ll x, ll y)
{
    if(y == 0) return 1;
    if(y == 1) return x;
    
    ll t = powe(x,y/2);
    t = (t*t)%mod;
    
    if(y%2 == 1) t = (t*x)%mod;
    
    return t;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////fibonacii//////////////////////////////////////////////////////////
// vi fib(100005);
// void fibo()
// {
// 	fib[0] = 1;fib[1] = 1;fib[2] = 2;
// 	for(int i=3;i<=10000;i++)
// 		fib[i] = (fib[i-1]%mod+fib[i-2]%mod)%mod;
// }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////DFS, Dijkstra and calc of which path was travelled more////////////
// void DFS(pii end)
// {
// 	queue<pii> q;
// 	q.push(end);
// 	int movex[] = {1,0,-1,0};
// 	int movey[] = {0,1,0,-1};
// 	while(!q.empty())
// 	{
// 		pii p = q.front();
// 		q.pop();
// 		int x = p.fr;
// 		int y = p.sc;
// 		rep(i,0,4)
// 		{
// 			int X = x + movex[i];
// 			int Y = y + movey[i];
// 			if(X>=0 && X<r && Y>=0 && Y<c && !visited[X][Y] && a[X][Y] != 'T')
// 			{
// 				dist[X][Y] = min(dist[X][Y], dist[x][y] + 1);
// 				q.push(mp(X,Y));
// 			}
// 		}
// 	}
// }

// vector<bool> visited(N, false);
// vector<vector<pair<ll,ll>>> adj(N);
// vector<pair<ll,ll>> edges;
// vector<ll> dist(N,INT_MAX);
// void dijkstra(ll start, ll n)
// {
// 	set<pair<ll,ll>> s;
// 	s.insert(mp(0,start));
// 	while(!s.empty())
// 	{
// 		pii p = *s.begin();
// 		s.erase(s.begin());
// 		for(pii u:adj[p.sc])
// 		{
// 			ll to = u.fr;
// 			ll time = u.sc;
// 			if(dist[to] > dist[p.sc]+time)
// 			{
// 				s.erase({dist[to], to});
// 				dist[to] = dist[p.sc]+time;
// 				s.insert({dist[to], to});
// 			}
// 		}
// 	}
// }

// ll dfs(priority_queue<ll>& pq, vvi& adj, ll start, ll par)
// {
// 	ll sum = 1;
// 	for(auto u:adj[start])
// 	{
// 		if(u != par)
// 		{
// 			ll x = dfs(pq, adj, u, start);
// 			pq.push((adj.size()-x)*x);
// 			sum += x;
// 		}
// 	}
// 	return sum;
// }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

ll t,n,m;


int main()
{
	fio;
	cin>>t;
	while(t--)
	{
		cin>>n;
		rep(i,2,n+1)
		{
			cout<<i<<" ";
		}
		cout<<1<<endl;
	}
}