Andrew and the Meatballs again

All submissions for this problem are available.
Andrew likes meatballs very much as you know.
He has N plates of meatballs, here the i^{th} plate contains exactly i meatballs. Andrew wants to take exactly K plates to his trip to Las Vegas.
On this occasion, he wants to choose the K plates by a strange way: if both i^{th} and j^{th} plates are chosen, then i and j must not be relative prime, for all 1 ≤ i < j ≤ N.
Please help him to choose K plates. Output one of the possible choices.
Input
The first line of the input contains an integer T, denoting the number of test cases. The description of T test cases follows. The first line and only line of each test case contains two spaceseparated integers N and K.
Output
For each test case, output K distinct integers, denoting the number of selected plates, where the plates are numbered from 1 to N. If there are multiple solutions, any one will do. If it is impossible to choose K plates, print only one integer 1.
Constraints
 1 ≤ T ≤ 7
 1 ≤ K ≤ N ≤ 777
Example
Input: 2 100 3 100 100 Output: 45 63 35 1
Explanation
Example case 1: One of the possible choices is that he takes 45^{th} plate, 63^{rd} plate, and 35^{th} plate. Because
GCD(45, 63) = 9,
GCD(45, 35) = 5,
GCD(63, 35) = 7.
Example case 2: He must choose all N = K plates in this case. But, for example, the pair of 3^{rd} plate and 5^{th} plate does not satisfy his desire. So it is impossible to choose K plates.
Author:  witua 
Tester:  laycurse 
Editorial  http://discuss.codechef.com/problems/AMMEAT2 
Tags  adhoc, cook33, simple, witua 
Date Added:  21042013 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  C, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions