#include using namespace std; #include #include #include #include #include template struct acl_fac { std::vector facs, facinvs; acl_fac(int N) { assert(-1 <= N and N < modint::mod()); facs.resize(N + 1, 1); for (int i = 1; i <= N; i++) facs[i] = facs[i - 1] * i; facinvs.assign(N + 1, facs.back().inv()); for (int i = N; i > 0; i--) facinvs[i - 1] = facinvs[i] * i; } modint ncr(int n, int r) const { if (n < 0 or r < 0 or n < r) return 0; return facs[n] * facinvs[r] * facinvs[n - r]; } modint operator[](int i) const { return facs[i]; } modint finv(int i) const { return facinvs[i]; } }; using mint = atcoder::modint998244353; acl_fac fac(1 << 18); int main() { cin.tie(nullptr), ios::sync_with_stdio(false); int N, A, B; cin >> N >> A >> B; const auto p2 = mint(A) / B * 2; vector f{0, 1}; // f[i] = 人 1, 2, ..., i のいずれかが最後に勝つ確率 * nCi for (int t = 0; t < N; ++t) { auto g = f; for (int i = 0; i <= 1 << t; ++i) g.at(i) += (fac.ncr(1 << t, i) - f.at(i)) * p2; f = atcoder::convolution(f, g); } for (int i = 1; i <= 1 << N; ++i) cout << (f.at(i) / fac.ncr(1 << N, i) - f.at(i - 1) / fac.ncr(1 << N, i - 1)).val() << '\n'; }