#include<bits/stdc++.h>
using namespace std;
int a[602];
int main(){
	freopen("live.in","r",stdin);
	freopen("live.out","w",stdout);
    int n,w;
	cin>>n>>w;
    for(int i=1; i<=n; i++){
        int x;cin>>x;a[x]++;
        int k=max(1,int(i*w/100.0)),ans=0;
        for(int j=600; j>=0; j--){
            if(ans+a[j]<k) ans+=a[j];
            else{
                cout<<j<<" ";
                break;
            }
        }
    }
	return 0;
}