#include <iostream>
using namespace std;
double d[2][50050];
int main() {
int n;
cin >> n;
double p;
cin >> p;
d[1][1] = 1;
for (int i = 2; i <= n; ++i) {
double *from = d[~i & 1];
double *to = d[i & 1];
for (int j = 1; j <= i; ++j) {
to[j] = 1 + from[j] * p + from[j - 1] * (1 - p);
}
}
cout << fixed;
cout.precision(10);
for (int i = 1; i <= n; ++i) {
cout << d[n & 1][i] << '\n';
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKZG91YmxlIGRbMl1bNTAwNTBdOwppbnQgbWFpbigpIHsKICAgIGludCBuOwogICAgY2luID4+IG47CiAgICBkb3VibGUgcDsKICAgIGNpbiA+PiBwOwogICAgZFsxXVsxXSA9IDE7CiAgICBmb3IgKGludCBpID0gMjsgaSA8PSBuOyArK2kpIHsKICAgICAgICBkb3VibGUgKmZyb20gPSBkW35pICYgMV07CiAgICAgICAgZG91YmxlICp0byA9IGRbaSAmIDFdOwogICAgICAgIGZvciAoaW50IGogPSAxOyBqIDw9IGk7ICsraikgewogICAgICAgICAgICB0b1tqXSA9IDEgKyBmcm9tW2pdICogcCArIGZyb21baiAtIDFdICogKDEgLSBwKTsKICAgICAgICB9CiAgICB9CiAgICBjb3V0IDw8IGZpeGVkOwogICAgY291dC5wcmVjaXNpb24oMTApOwogICAgZm9yIChpbnQgaSA9IDE7IGkgPD0gbjsgKytpKSB7CiAgICAgICAgY291dCA8PCBkW24gJiAxXVtpXSA8PCAnXG4nOwogICAgfQogICAgCiAgICByZXR1cm4gMDsKfQ==