#include<iostream>
#include<cmath>
using namespace std;
typedef long long ll;
ll x,n;
ll eq1(ll i){
return ceil((x-i+1)/(2.0*(n-1)));
}
ll eq2(ll i){
return ceil((x-(2*n-1-i))/(2.0*(n-1)));
}
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+CiNpbmNsdWRlPGNtYXRoPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKbGwgeCxuOwoKbGwgZXExKGxsIGkpewogICAgcmV0dXJuIGNlaWwoKHgtaSsxKS8oMi4wKihuLTEpKSk7Cn0KbGwgZXEyKGxsIGkpewogICAgcmV0dXJuIGNlaWwoKHgtKDIqbi0xLWkpKS8oMi4wKihuLTEpKSk7Cn0KCmludCBtYWluKCl7CiAgICAKICAgIGxsIHQ7ICBjaW4+PnQ7CiAgICB3aGlsZSh0LS0pewogICAgICAgIGNpbj4+eD4+bjsKICAgICAgICAKICAgICAgICBpZihuPT0xKSBjb3V0PDx4PDxlbmRsOwogICAgICAgIGVsc2UgewogICAgICAgICAgICBjb3V0PDxlcTEoMSk8PCIgIjsKICAgICAgICAgICAgCiAgICAgICAgICAgIGZvcihsbCBpPTI7aTxuO2krKykKICAgICAgICAgICAgICAgIGNvdXQ8PGVxMShpKStlcTIoaSk8PCIgIjsKICAgICAgICAgICAgICAgIAogICAgICAgICAgICBjb3V0PDxlcTEobik8PGVuZGw7CiAgICAgICAgfQogICAgICAgIAogICAgfQogICAgCiAgICByZXR1cm4gMDsKfQ==