An index
in a permutation of length is said to be good if:
- is divisible by
You are given integers and . You need to construct a permutation of length such that exactly indices in that permutation are good.
If no such permutation exists, output .
If multiple such permutations exist, output any.
Input Format
- The first line contains a single integer - the number of test cases. Then the test cases follow.
- The first and only line of each test case contains two integers and - the length of the permutation to be constructed and the number of good indices.
Output Format
For each test case, output any permutation satisfying the given condition.
Constraints
- Sum of over all testcases does not exceed
Sample Input 1
2
1 1
6 2
Sample Output 1
1
4 5 6 1 2 3
Explanation
Test case-1: In , is divisible by . Therefore it is a valid permutation having good index.
Test case-2: In , is divisible by and is divisible by . Therefore it is a valid permutation having good indices.
ConversionConversion EmoticonEmoticon