#include <bits/stdc++.h>

typedef long long ll;
const int N = 262154, mod = 998244353;

int n, ALL;
int f[N], p[N];

inline int & reduce(int &x) {return x += x >> 31 & mod;}
inline void add(int &x, const int y) {x += y - mod, x += x >> 31 & mod;}
ll PowerMod(ll a, int n, ll c = 1) {for (; n; n >>= 1, a = a * a % mod) if (n & 1) c = c * a % mod; return c;}

void FWT(int *a) {
	int i, j, k, r, len = 1;
	for (i = 0; i < n; ++i, len <<= 1)
		for (j = 0; j <= ALL; j += len << 1)
			for (k = j; k < j + len; ++k)
				r = a[k + len], reduce(a[k + len] = a[k] - r), add(a[k], r);
}

int main() {
	int i; ll s = 0;
	scanf("%d", &n), ALL = ~(-1 << n);
	for (i = 0; i <= ALL; ++i) scanf("%d", p + i), s += p[i];
	s = PowerMod(s, mod - 2);
	for (i = 0; i <= ALL; ++i) p[i] = p[i] * s % mod;
	s = 0, FWT(p);
	for (i = 1; i <= ALL; ++i) s += f[i] = PowerMod(mod + 1 - p[i], mod - 2, mod - 1);
	reduce(*f = -s % mod), FWT(f);
	for (i = 0; i <= ALL; ++i) printf("%d\n", f[i]);
	return 0;
}