#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<iomanip>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
int t;
cin>>t;
int a,b,i,j,k;
while(t--)
{
cin>>a>>b;
int x1=a*100;
int x2=a*100+99;
int p;
for(i=x2/b;i>=x1/b;i--)
{
if(i*b>x1 && i*b<x2)
{
p=i;
break;
}
}
for(i=x1/b;i<p;i++)
{
if(i*b>x1 && i*b<x2)
cout<<i*b-x1<<" ";
}
cout<<i*b-x1;
cout<<endl;
}
return 0;
}