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

Solution:
import math, sys
from collections import defaultdict, Counter, deque
from functools import reduce 

INF = float('inf')
MOD = int(1e9) + 7 

def solve():
	n = int(input())
	ans = [ i for i in range(n, 0, -1) ]
	if n % 2 == 1:
		mid = n // 2
		ans[mid - 1], ans[mid] = ans[mid], ans[mid - 1]
		
	print(*ans)
	

def main():
	t = 1 
	t = int(input())
	for _ in range(t):
		solve()
















		
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a 

def sieve():
	MAX = int(1e6 + 1)
	primes = [ 1 for i in range(MAX) ]
	primes[0] = primes[1] = 0 
	i = 2
	while i <= MAX ** 0.5:
		j = i * i 
		while primes[i] and j < MAX:
			if j % i == 0:
				primes[j] = 0 
			j += i 
		i += 1
	return primes

def input():
	return sys.stdin.readline().rstrip('\n').strip()

def print(*args, sep=' ', end='\n'):
	first = True 
	for arg in args:
		if not first:
			sys.stdout.write(str(sep))
		sys.stdout.write(str(arg))
		first = False 

	sys.stdout.write(end)


def vars():
	return map(int, input().split())

def array():
	return list(map(int, input().split()))


if __name__ == '__main__':

	main()