After the death of Meghnad and Kumbhakaran, Raavan got scared. He used his mind and presented a proposal of a war of numbers instead of Bow and arrows to Ram.
According to him, Laxman will select a number N, Raavan has to subtract a number which is at least 1 and at most k. After that Ram has to subtract a number at least 1 and at most k. And they both subtract alternatively till the number becomes less than 1. The last player to subtract will be the winner.
You are Laxman and you have to find out the p smallest numbers that can be used as N so that Ram will always win. Both Ram and Raavan are genius-minded and play optimally at every point.
Input Format :
First line contains one integer T - No. of testcases. After that , the next T lines will contain two space-separated integers p and k.
Output Format :
For every testcase print the p smallest space-separated integers that can be taken as N which assures the winning of Ram.
Constraints:
1<=T<=10
1<=N<10^6
1<=k<=10000
1<=p<=50
There are 2 testcases. For first testcase: p is 1 i.e. the smallest number of N is to find out. And k is 4 i.e. the number which can be subtracted is at least 1 and at most 4. N is 5 initially. After this, if Raavan subtracts 1, then Ram will subtract 4 to make it less than 1. If Raavan subtracts 2, then Ram will subtract 3. If Raavan subtracts 3, then Ram will subtract 2. If Raavan subtracts 4, then Ram will subtract 1. Hence in all cases, Ram will win. There is no N smaller than 5 which can make Ram win because ,say, if N is 4 then Raavan will subtract 4 from it to make it 0. So, 5 is the smallest one.
For second testcase: p is 2 i.e 2 smallest numbers are to find out. And k is 3 i.e. number from 1 to 3 can be subtracted. We can check taking from N=1,2,3,... and we will get that the smallest two numbers are 4 and 8 which make Ram win.