#include <stdio.h>
int main()
{
int i, n, a;
int b = 0, sum = 0;
scanf("%d %d",&a,&n);//输入a的值空格再输b的值
for(i = 0; i < n; i++ )
{
sum = sum*10 + a;//每次循环把前一次的值乘以10再加a
printf("%d\n",sum);
b = b + sum;//把值加起来
}
printf("%d\n",b);
return 0;
}