First Subtask Solution Accepted (AC).

Second Subtask Rejected (WA).

Please Help Me Find The Problem.

Problem Link: Contest Page | CodeChef

My Submission:

Solution: 51844491 | CodeChef

Here Is My Code:

```
for tc in range(int(input())):
N, K = map(int, input().split(" "))
if N - K >= 2:
ans = ""
L = [x for x in range(N, K, -1)]
N = [x for x in range(1, K+1)]
N.extend(L)
for x in N:
ans += str(x) + " "
print(ans)
#Tried Removing trailing Spaces
else:
print(-1)
```