You are given an integer N. 

Construct any permutation A of N integers such that the value LCM(1 + A_{1} , 2 + A_{2}, \ldots, N + A_{N}) is minimised. 

Note:
LCM denotes the [least common multiple] of the integers.
A permutation of N integers contains all integers from 1 to N exactly once.

------ Input Format ------ 

- First line will contain T, number of test cases. Then the test cases follow.
- Each test case contains a single line of input, one integer N.

------ Output Format ------ 

For each test case, output a permutation that minimises the value LCM(1 + A_{1} , 2 + A_{2}, \ldots, N + A_{N}).

------ Constraints ------ 

$1 ≤ T ≤ 1000$
$2 ≤ N ≤ 1000$

----- Sample Input 1 ------ 
1
2

----- Sample Output 1 ------ 
2 1 

----- explanation 1 ------ 
Test case $1$: The permutation for which the value is minimised is $[2, 1]$. The minimum value is $LCM(1+2, 2+1) = LCM(3, 3) = 3$.

Source: codechef | Difficulty: EASY
Tags: Constructive algorithms

Combinatorics

Number theory

Mathematics

Ad-hoc


Solutions:
for _ in range(int(input())):
	n = [x for x in range(1, int(input()) + 1)]
	print(*n[::-1])


for i in range(int(input())):
	n = int(input())
	while n > 0:
		print(n, end=' ')
		n = n - 1
	print()


for i in range(int(input())):
	n = [x for x in range(1, int(input()) + 1)]
	print(*n[::-1])


t = int(input())
for i in range(t):
	n = int(input())
	for i in range(n, 0, -1):
		print(i, end=' ')


for i in range(int(input())):
	n = int(input())
	A = []
	for x in range(n, 0, -1):
		A.append(x)
	for k in A:
		print(k, end=' ')


n = int(input())
for i in range(n):
	m = int(input())
	print(*range(m, 0, -1))


for _ in range(int(input())):
	n = int(input())
	print(*range(n, 0, -1))


import math
N = int(input())
for i in range(N):
	t = int(input())
	for j in range(t, 0, -1):
		print(j, end=' ')


import math
n = int(input())
for i in range(n):
	a = int(input())
	print(*range(a, 0, -1))


t = int(input())
for i in range(t):
	n = int(input())
	a = []
	while n > 0:
		a.append(n)
		n = n - 1
	print(*a)


for _ in range(int(input())):
	n = int(input())
	for i in range(0, n):
		print(n - i, end=' ')


for x in range(int(input())):
	n = int(input())
	print(*range(n, 0, -1))


for i in range(0, int(input())):
	n = int(input())
	for j in range(0, n):
		print(n, end=' ')
		n = n - 1


for i in range(int(input())):
	m = int(input())
	print(*range(m, 0, -1))
	pass


T = int(input())
for _ in range(T):
	n = int(input())
	print(*[x for x in range(n, 0, -1)])


for _ in range(int(input())):
	x = int(input())
	list1 = []
	for i in range(1, x + 1):
		list1.append(str(i))
	list1.reverse()
	print(' '.join(list1))


import math
for i in range(int(input())):
	n = int(input())
	l = []
	for i in range(1, n + 1):
		l.append(i)
	for i in l[::-1]:
		print(i, end=' ')


for _ in range(int(input())):
	inpt = int(input())
	list1 = list(range(1, inpt + 1))
	list1.reverse()
	for x in range(0, inpt - 1):
		print(list1[x], end=' ')
	print(list1[-1])


for _ in range(int(input())):
	x = int(input())
	List = []
	for i in range(1, x + 1):
		List.append(i)
	print(*List[::-1])


for _ in range(int(input())):
	List = [x for x in range(1, int(input()) + 1)]
	print(*List[::-1])


for i in range(int(input())):
	k = int(input())
	for i in range(k, 0, -1):
		print(i, end=' ')


goals = int(input())
for distractions in range(goals):
	life = [wife for wife in range(1, int(input()) + 1)]
	print(*life[::-1])


for i in range(int(input())):
	k = [j for j in range(int(input()), 0, -1)]
	print(*k)


def lcm(first, sec):
	tf = first
	ts = sec
	while sec != 0:
		temp = sec
		sec = first % sec
		first = temp
	return tf * ts // first
t = int(input())
for i in range(t):
	n = int(input())
	nw = n
	l = []
	k = 1
	for j in range(n):
		l.append(nw + k)
		print(nw, end=' ')
		nw -= 1
		k += 1
	fi = l[j]
	for j in range(1, n):
		res = lcm(fi, l[j])
		fi = res


for i in range(int(input())):
	c = [y for y in range(1, int(input()) + 1)]
	print(*c[::-1])


import math
T = int(input())
for i in range(T):
	N = int(input())
	j = 1
	LCM = []
	for i in range(1, N + 1)[::-1]:
		print(i, end=' ')


for i in range(int(input())):
	n = int(input())
	l = list(range(1, n + 1))
	l.reverse()
	for i in l:
		print(i, end=' ')


for _ in range(int(input())):
	n = [i for i in range(1, int(input()) + 1)]
	print(*n[::-1])


for T in range(int(input())):
	n = int(input())
	for x in range(n):
		print(n - x, end=' ')
	print()


tc = int(input())
for _ in range(tc):
	n = int(input())
	for j in range(n, 0, -1):
		print(j, end=' ')


for i in range(int(input())):
	x = int(input())
	for i in range(x, 0, -1):
		print(i, end=' ')


for i in range(int(input())):
	n = int(input())
	l = list(range(n, 0, -1))
	print(*l)


for i in range(int(input())):
	x = int(input())
	for i in reversed(range(x)):
		print(i + 1, end=' ')


import math
for i in range(int(input())):
	n = [x for x in range(1, int(input()) + 1)]
	print(*n[::-1])


for i in range(int(input())):
	l = [x for x in range(1, int(input()) + 1)]
	print(*l[::-1])


for _ in range(int(input())):
	N = int(input())
	ls = []
	for i in range(1, N + 1):
		ls.append(i)
	ls.sort()
	ls.reverse()
	for i in range(len(ls)):
		print(ls[i], end=' ')
	print()


X = int(input())
for i in range(X):
	a = int(input())
	for i in range(a, 0, -1):
		print(i, end=' ')
	print()