#include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
const int maxn = 1e5 + 5;
int n, w, g[maxn];
bool cmp(int x, int y) {
return x > y;
}
int main() {
cin >> n >> w;
for (int i = 1; i <= n; i++)
cin >> g[i];
for (int i = 1; i <= n; i++) {
int num, tmp[maxn];
for (int j = 1; j <= i; j++) {
tmp[j] = g[j];
}
sort (tmp + 1, tmp + n + 1, cmp);
if (i * w / 100 >= 1)
num = floor(i * w / 100);
else
num = 1;
cout << tmp[num] << ' ';
}
return 0;
}