#include using namespace std; typedef long long int ll; typedef pair P; typedef vector VI; typedef vector VVI; #define REP(i,n) for(ll i=0;i<(n);i++) #define ALL(v) v.begin(),v.end() template bool chmax(T &x, const T &y) {return (x bool chmin(T &x, const T &y) {return (x>y)?(x=y,true):false;}; constexpr ll MOD=998244353; constexpr ll INF=2e18; int popc(int x){ int ret=0; REP(i,20){ ret+=x&1; x>>=1; } return ret; } int main(){ int n; cin >> n; VVI s(n,VI(n)); REP(i,n)REP(j,n) cin >> s[i][j]; VVI dp(1<0;j=((j-1)&i)){ if(popc(j)!=ipc/2) continue; REP(x,n)REP(y,n){ if(s[x][y]){ dp[i][x]+=dp[j][x]*dp[i^j][y]; dp[i][x]+=dp[i^j][x]*dp[j][y]; } } } } REP(i,n) cout << dp[(1<