Problem Statement:Captain America and Iron Man are at WAR and the rage inside Iron Man is rising.

But Iron Man faces a problem to identify the location of Captain America.

There are N buildings situtaed adjacently to each other and Captain America can be at any building.

Iron Man has to arrange the Buildings from 1 to N is such a way that Value(i.e abs(Building Number -Position of Building))=K for every building.

Can You help Iron Man to Find The Arrangement of the Buildings?

P.S- If no arrangement exist, then print         
“CAPTAIN AMERICA EVADES”.

Input Format:
The first line of input contains a single integer,T, denoting the number of test cases.

Each of the T  subsequent lines contains 2 space-separated integers describing the respective N and K values for a test case.

Output Format:
On a new line for each test case, 

Print the lexicographically smallest arrangement; 

If no absolute arrangement exists, print “CAPTAIN AMERICA EVADES”.

Constraints:
SubTask#1
1<=T<=10

1<=N<=10^5

0<=K<=N

SubTask#2
Original Constraints..

SubTask#3
Original Constraints..

Sample Input:
3

2 1

3 0

3 2

Sample Output:

2 1

1 2 3

CAPTAIN AMERICA EVADES

Explanation:
Case 1:

N=2 and K=1

Therefore the arrangement is [2,1].

Case 2:

N=3 and K=0

Therefore arrangement is [1,2,3].

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
t = int(input())
while t > 0:
	t = t - 1
	(n, k) = list(map(int, input().split()))
	a = [0] * n
	done = True

	def swap(z):
		for j in range(0, n):
			if a[j] == 0:
				a[j] = z
				done = True
				break
			elif a[j] > z:
				swap(j)
				a[j] = z
			else:
				done = False
				break
	for i in range(0, n):
		for j in range(0, n):
			if abs(i - j) == k:
				if a[j] == 0:
					a[j] = i + 1
					done = True
					break
				elif a[j] > i + 1:
					swap(a[j])
					a[j] = i + 1
				else:
					done = False
	if 0 in a:
		print('CAPTAIN AMERICA EVADES')
	elif done:
		for c in a:
			print(c, end=' ')
		print()
	else:
		print('CAPTAIN AMERICA EVADES')


t = int(input())
while t:
	t -= 1
	a = [int(i) for i in input().split()]
	n = int(a[0])
	k = int(a[1])
	flag = 1
	if k == 0:
		res = [i + 1 for i in range(n)]
	elif k > n / 2 or n % (2 * k) != 0:
		flag = 0
	else:
		temp1 = [i + 1 for i in range(k)]
		temp2 = [i + 1 for i in range(k, 2 * k)]
		temp = temp2 + temp1
		res = []
		x = n / (2 * k)
		while x:
			x -= 1
			res += temp
			temp = [i + 2 * k for i in temp]
	if flag:
		res = [str(i) for i in res]
		print(' '.join(res))
	else:
		print('CAPTAIN AMERICA EVADES')