#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int n; vector s; map,long long> mp; void dfs(vector a,vector b,long long num){ if(a.size()==0){ //cout<>n; s.resize(n,""); rep(i,n){ rep(j,n){ int t; cin>>t; s[i] += '0'+t; } } //mp[ //ans.resize(n,0); vector a(n); rep(i,n)a[i] = i; mp[a] ++; int nn = n; while(n!=1){ vector b; map,long long> nmp = mp; mp.clear(); for(auto x:nmp){ dfs(x.first,b,x.second); } n>>=1; } n = nn; vector ans(n,0); for(auto x:mp){ ans[x.first[0]] += x.second; } rep(i,n)ans[i] *= 1LL<<(n-1); rep(i,n){ cout<