#include<iostream>
using namespace std;
int main()
{
int a,i,b,t,k;
while(cin>>a>>b,a,b){
t=a*100;
k=0;
for(i=0;i<100;i++)
if((t+i)%b==0)
{
if(k==0)
{
if(i==0)
cout<<"00";
else
printf("%02d",i);
k++;
}
else
printf(" %02d",i);
}
cout<<endl;
}
return 0;
}
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
int a,i,b,t,k,j,s[10000];
while(cin>>a>>b,a,b){
j=0;
t=a*100;
k=0;
for(i=0;i<100;i++){
if((t+i)%b==0)
//{
// if(k==0)
//{
//if(i==0)
// cout<<"00";
//else
s[j++] = i;}
//
for(i=0;i<j;i++)
if(i==j-1)
printf("%02d",s[i]);
else
printf("%02d ",s[i]);
//k++;
//}
//else
//printf(" %02d",i);
//}
cout<<endl;
}
return 0;
}