#include<iostream>
#include<cmath>
#include<string>
#include<stdio.h>
#include<algorithm>
#include<iomanip>
using namespace std;
int a[100001], top = 0;
bool cmp(int x, int y) {
if (x == y) return 0;
return x > y;
}
int main() {
int n, w, k;
cin >> n >> w;
while (n--) {
cin >> k;
a[++top] = k;
if (top != 1)
sort(a + 1, a + top + 1, cmp);
if (top == 1)
cout << k << ' ';
else cout << a[max(1, top * w / 100)] << ' ';
}
return 0;
}