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>
#include <unordered_map>
using namespace std;
#include <math.h>
#define ll long long int
#define ld long long double
#define pb push_back
#define pll pair<ll, ll>
#define vi vector<int>
#define vl vector<ll>
#define vvl vector<vector<ll> >
#define vvi vector<vector<int> >
#define vlp vector<pair<ll, ll> >
#define vllp vector<pair<ll, ll>, ll>
#define mll map<ll, ll>
#define rep(i, a) for (ll i = 0; i < a; i++)
#define rep1(i, a) for (ll i = 1; i < a; i++)
#define foi(i, a, b) for (ll i = a; i < b; i++)
#define fod(i, a, b) for (ll i = a; i >= b; i--)
#define mp make_pair
#define fst first
#define sec second
#define ff first.first
#define fs first.second
#define pi pair<int, int>
#define ppi pair<pair<int, int>, int>
#define max3(a, b, c) max(max(a, b), c)
#define min3(a, b, c) min(min(a, b), c)
#define MAX 1000001
//#define MOD 1000000007
#define MOD 998244353
#define INF (ll)1e18
#define s(v) v.size()
#define e(v) v.empty()
//typedef long long ll;
ll gcd(ll a, ll b)
{
  if (b == 0)
    return a;
  return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
ll fexp(ll a, ll b)
{
  ll ans = 1;
  while (b)
  {
    if (b & 1)
      ans = ans * a % MOD;
    b /= 2;
    a = a * a % MOD;
  }
  return ans;
}
ll inverse(ll a, ll p) { return fexp(a, p - 2); }
// bool sortbysec(const pll &a, const pll &b){return (a.second < b.second);}

ll modify(ll n)
{
  ll res = n;
  res %= MOD;
  res += MOD;
  res %= MOD;
  return res;
}
ll min(ll a, ll b)
{
  if (a > b)
    return b;
  return a;
}
bool isPrime(int x) 
{ 
   if (x == 1)
		return false;
	for (int i = 2; i * i <= x; ++i)
		if (x % i == 0)
			return false;
	return true;
}
vvl grap(300100);
vvl vect(300100);
vl v(300100);
vl num(300100,0);
vl sqr(300100,0);
ll modu = pow(2,32);
void ingraph(vvl &graph, ll m )
{
  ll x, y;
  rep(i, m)
  {
    cin >> x >> y;
    graph[x].pb(y);
    graph[y].pb(x);
  }
}

void dfs(ll node,ll par, ll sum ){

  for(int i=0;i<s(vect[par]);i++){
    vect[node].pb(vect[par][i]);
  }
  vect[node].pb(node);
  sum = (sum + v[node-1]*v[node-1]) % modu;
  sqr[node] = sum;
  num[node]=1;
  for(auto i: grap[node]){
    if(num[i]==1)continue;
    dfs(i,node,sum);
    }

}
queue<pair<ll,ll> > qu;

void depth(ll n,ll m){
 
}
vl fact(400001,1);

void solve()
{ 
    ll n,m;
    cin>>n;
    vl v(n);
    v[0]=n;
    rep(i,n-1){
      v[i+1]=i+1;
    }
    for(auto i:v){cout<<i<<" ";}cout<<endl;
    

    
}
int main()
{ 
  ios_base::sync_with_stdio(0); cin.tie(0);
  ll n = 1;
  for(int i=0;i<400000;i++){
  fact[i+1]=(fact[i]*(i+1))%998244353;
  }
  cin >> n;
  while (n--)
  {
    solve();
  }
  return 0;
}