#include<iostream>
#include<cmath>
using namespace std;
typedef long long ll;
ll x,n;
ll eq1(ll i){
return (x-i+1 + 2*n-3) / (2*n - 2);
}
ll eq2(ll i){
return (x - (2*n -1 - i) + 2*n - 3) / (2*n - 2);
}
int main(){
ll t; cin>>t;
while(t--){
cin>>x>>n;
if(n==1) cout<<x<<endl;
else {
cout<<eq1(1)<<" ";
for(ll i=2;i<n;i++)
cout<<eq1(i)+eq2(i)<<" ";
cout<<eq1(n)<<endl;
}
}
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGNtYXRoPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKbGwgeCxuOwogCmxsIGVxMShsbCBpKXsKICAgIHJldHVybiAoeC1pKzEgKyAyKm4tMykgLyAoMipuIC0gMik7Cn0KbGwgZXEyKGxsIGkpewogICAgcmV0dXJuICh4IC0gKDIqbiAtMSAtIGkpICsgMipuIC0gMykgLyAoMipuIC0gMik7Cn0KIAppbnQgbWFpbigpewogCiAgICBsbCB0OyAgY2luPj50OwogICAgd2hpbGUodC0tKXsKICAgICAgICBjaW4+Png+Pm47CiAKICAgICAgICBpZihuPT0xKSBjb3V0PDx4PDxlbmRsOwogICAgICAgIGVsc2UgewogICAgICAgICAgICBjb3V0PDxlcTEoMSk8PCIgIjsKIAogICAgICAgICAgICBmb3IobGwgaT0yO2k8bjtpKyspCiAgICAgICAgICAgICAgICBjb3V0PDxlcTEoaSkrZXEyKGkpPDwiICI7CiAKICAgICAgICAgICAgY291dDw8ZXExKG4pPDxlbmRsOwogICAgICAgIH0KIAogICAgfQogCiAgICByZXR1cm4gMDsKfQ==