#include <cstdio>
#include <algorithm>
#include <iostream>
#include<cstring>
#include<cmath>
using namespace std;
const int maxn=100005;
int f(int a,long k)
{
int b;
while(k--)
{
b=10*ceil(pow(a,0.5));
a=b;
}
return b;
}
int main()
{
long n,k,i,j;
int a[maxn];
scanf("%ld%ld",&n,&k);
for(i=1;i<=n;i++)
{
scanf("%ld",&a[i]);
}
if(k>=5)
{
for(i=1;i<=n;i++)
printf("100 ");
}
else if(k<5)
{
for(i=1;i<=n;i++)
printf("%d ",f(a[i],k));
}
printf("\n");
}