#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>
#include <random>

using namespace std;
template<class T1, class T2> inline void chkmin(T1 &x, const T2 &y) {if (x > y) x = y;}
template<class T1, class T2> inline void chkmax(T1 &x, const T2 &y) {if (x < y) x = y;}
#define all(c) (c).begin(), (c).end()
#define sz(c) (int)(c).size()
#define mp make_pair
#define pb push_back
#define read(FILENAME) freopen((string(FILENAME) + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((string(FILENAME) + ".out").c_str(), "w", stdout);
const int MAXN = 270228;
const int Mod = 998244353;


int add(const int &a, const int &b) {
	return (a + b >= Mod ? a + b - Mod: a + b);
}


int dec(const int &a, const int &b) {
	return (a >= b ? a - b: a - b + Mod); 
}


int mul(const int &a, const int &b) {
	return (1LL * a * b) % Mod;
}


int powm(int a, int b) {
	int res = 1;
	while (b) {
		if (b & 1) res = mul(res, a);
		a = mul(a, a);
		b >>= 1;
	}	
	return res;
}




int n, w;
int a[MAXN], b[MAXN], c[MAXN];


void bpf(int *a) {
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 1 << n; j++) {
			if (j >> i & 1) {
				int x = a[j ^ (1 << i)];
				int y = a[j];
				a[j ^ (1 << i)] = add(x, y); 
				a[j] = dec(x, y);
			}
		}
	}
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	//read("input");
	cin >> n;
	for (int i = 0; i < (1 << n); i++) {
		cin >> a[i]; 
		w += a[i];
	}
	w = powm(w, Mod - 2);
	for (int i = 0; i < 1 << n; i++) {
		a[i] = dec(0, mul(a[i], w));
		b[i] = 1;
	}
	c[0] = dec(0, 1 << n); 
	a[0] = add(a[0], 1);
	bpf(a); 
	bpf(b); 
	bpf(c);
	for (int i = 1; i < 1 << n; ++i) {
		a[i] = mul(add(b[i], c[i]), powm(a[i], Mod - 2));
		a[0] = dec(a[0], a[i]);
	}
	bpf(a);
	w = powm(1 << n, Mod - 2);
	for (int i = 0; i < 1 << n; i++) {
		cout << mul(a[i], w) << '\n';
	}
 	return 0;
}
