#include <bits/stdc++.h>
#define lowbit(x) (x&(-x))
#define lson root<<1,l,mid
#define rson root<<1|1,mid+1,r
using namespace std;
const int maxn=1e5+10;
int a[maxn];
int main()
{
int n,k;
scanf("%d%d",&n,&k);
for(int i=0;i<n;++i)
{
scanf("%d",a+i);
for(int j=0;j<k&&a[i]!=100;++j)
a[i]=10*ceil(sqrt(a[i]));
}
for(int i=0;i<n;++i)
printf("%d%c",a[i]," \n"[i==n-1]);
}