#include<bits/stdc++.h>
using namespace std;
int n,w,score,x;
int grade[1000001];
int main(){
cin>>n>>w;
for(int i=1;i<=n;i++){
int j=1;
cin>>x;
score=max(1,i*w/100);
while(grade[j]>=x)j++;
for(int k=i;k>j;k--)grade[k]=grade[k-1];
grade[j]=x;
cout<<grade[score]<<" ";
}
return 0;
}