import std.conv, std.functional, std.range, std.stdio, std.string;
import std.algorithm, std.array, std.bigint, std.complex, std.container, std.math, std.numeric, std.regex, std.typecons;
import core.bitop;

class EOFException : Throwable { this() { super("EOF"); } }
string[] tokens;
string readToken() { for (; tokens.empty; ) { if (stdin.eof) { throw new EOFException; } tokens = readln.split; } auto token = tokens.front; tokens.popFront; return token; }
int readInt() { return readToken.to!int; }
long readLong() { return readToken.to!long; }
real readReal() { return readToken.to!real; }

bool chmin(T)(ref T t, in T f) { if (t > f) { t = f; return true; } else { return false; } }
bool chmax(T)(ref T t, in T f) { if (t < f) { t = f; return true; } else { return false; } }

int binarySearch(alias pred, T)(in T[] as) { int lo = -1, hi = cast(int)(as.length); for (; lo + 1 < hi; ) { const mid = (lo + hi) >> 1; (unaryFun!pred(as[mid]) ? hi : lo) = mid; } return hi; }
int lowerBound(T)(in T[] as, T val) { return as.binarySearch!(a => (a >= val)); }
int upperBound(T)(in T[] as, T val) { return as.binarySearch!(a => (a > val)); }


// a^-1 (mod m)
long modInv(long a, long m)
/*in {
  assert(m > 0, "modInv: m > 0 must hold");
}
do*/ {
  long b = m, x = 1, y = 0, t;
  for (; ; ) {
    t = a / b;
    a -= t * b;
    if (a == 0) {
      assert(b == 1 || b == -1, "modInv: gcd(a, m) != 1");
      if (b == -1) {
        y = -y;
      }
      return (y < 0) ? (y + m) : y;
    }
    x -= t * y;
    t = b / a;
    b -= t * a;
    if (b == 0) {
      assert(a == 1 || a == -1, "modInv: gcd(a, m) != 1");
      if (a == -1) {
        x = -x;
      }
      return (x < 0) ? (x + m) : x;
    }
    y -= t * x;
  }
}

enum long MO = 998244353;
enum INV2 = modInv(2, MO);

int N;
long[] A;

long[] P;

void hadamard(long[] z) {
  foreach (e; 0 .. N) {
    foreach (i; 0 .. 1 << N) {
      const j = i ^ (1 << e);
      if (i < j) {
        const t = (z[i] + z[j]) % MO;
        z[j] = (z[i] - z[j]) % MO;
        z[i] = t;
      }
    }
  }
}

void main() {
  debug {
    enum n = 3;
    write("Det[{{-1");
    foreach (j; 1 .. 1 << n) {
      write(",0");
    }
    write("}");
    foreach (i; 1 .. 1 << n) {
      write(",{");
      foreach (j; 0 .. 1 << n) {
        if (j > 0) {
          write(",");
        }
        if (i == j) {
          foreach (k; 1 .. 1 << n) {
            writef("-p%s", k);
          }
        } else {
          writef("p%s", i ^ j);
        }
      }
      write("}");
    }
    writeln("}]");
  }
  
  try {
    for (; ; ) {
      N = readInt();
      A = new long[1 << N];
      foreach (i; 0 .. 1 << N) {
        A[i] = readLong();
      }
      
      long sumA;
      foreach (i; 0 .. 1 << N) {
        sumA += A[i];
      }
      P = new long[1 << N];
      foreach (i; 0 .. 1 << N) {
        P[i] = (A[i] * modInv(sumA, MO)) % MO;
      }
      
      debug {
        foreach (i; 1 .. 1 << N) {
          long ans;
          foreach (j; 1 .. 1 << N) {
            if (popcnt(i & j) & 1) {
              long sum;
              foreach (k; 1 .. 1 << N) {
                if (popcnt(j & k) & 1) {
                  sum += P[k];
                  sum %= MO;
                }
              }
              ans += modInv(sum, MO);
              ans %= MO;
            }
          }
          writeln("brute ", i, ": ", ans);
        }
      }
      
      auto x = P.dup;
      debug {
        writeln("x = ", x);
      }
      x.hadamard;
      debug {
        writeln("x = ", x);
      }
      
      auto y = new long[1 << N];
      foreach (i; 1 .. 1 << N) {
        long tmp = (x[0] - x[i]) % MO;
        tmp *= INV2;
        tmp %= MO;
        y[i] = modInv(tmp, MO);
      }
      debug {
        writeln("y = ", y);
      }
      y.hadamard;
      debug {
        writeln("y = ", y);
      }
      
      writeln(0);
      foreach (i; 1 .. 1 << N) {
        long ans = (y[0] - y[i]) % MO;
        ans *= INV2;
        ans %= MO;
        ans = (ans % MO + MO) % MO;
        writeln(ans);
      }
    }
  } catch (EOFException e) {
  }
}


Measured memory_bytes: 18964