#include <bits/stdc++.h>
using namespace std;
int main(){
int tong[601],a[100000];
int n,l,num,j,co;
scanf("%d%d",&n,&l);
for(int i = 1;i<=n;i++){
scanf("%d",&num);
tong[num]+=1;
j = 0;
co = 600;
while(j<max(1,i*l/100)){
j+=tong[co];
co-=1;
}
a[i-1]=co+1;
}
for(int i = 0;i<n;i++){
printf("%d ",a[i]);
}
return 0;
}