#include<stdio.h>
#include<math.h>
int main()
{
int n,k,a[100000];
scanf("%d %d",&n,&k);
for(int i=0;i<n;i++)
{
scanf("%d",&a[i]);
if(k>=5)
{
a[i]=100;
}
else
{
for(int j=0;j<k;j++)
{
a[i]=(int)(0.99+sqrt((double)(a[i])))*10;
}
}
if(i<=n-2)
printf("%d ",a[i]);
else
{
printf("%d",a[i]);
}
}
return 0;
}