#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e+7;
const ld PI = acos(-1);  
const ld EPS = 1e-8;
const ll LINF = 1LL<<60;
const int INF = 1LL<<17;
#define rep(i, a, b) for(ll i=a; i<(ll)(b); i++)
#define rrep(i, a, b) for(ll i=b-1; a<=i; i--)
#define ALL(x) x.begin(), x.end()
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
ll ceil(ll a, ll b) {if(a==0) return 0; return (a-1)/b+1;}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
string YES[2] = {"NO", "YES"};
string yes[2] = {"No", "Yes"};

template<int MOD> struct Fp {
    long long val;
    constexpr Fp(long long v = 0) noexcept : val(v % MOD) {
        if (val < 0) val += MOD; 
    }
    constexpr int getmod() { return MOD; }
    constexpr Fp operator - () const noexcept {
        return val ? MOD - val : 0;
    }
    constexpr Fp operator + (const Fp& r) const noexcept { return Fp(*this) += r; }
    constexpr Fp operator - (const Fp& r) const noexcept { return Fp(*this) -= r; }
    constexpr Fp operator * (const Fp& r) const noexcept { return Fp(*this) *= r; }
    constexpr Fp operator / (const Fp& r) const noexcept { return Fp(*this) /= r; }
    constexpr Fp& operator += (const Fp& r) noexcept {
        val += r.val;
        if (val >= MOD) val -= MOD;
        return *this;
    }
    constexpr Fp& operator -= (const Fp& r) noexcept {
        val -= r.val;
        if (val < 0) val += MOD; 
        return *this;
    }
    constexpr Fp& operator *= (const Fp& r) noexcept {
        val = val * r.val % MOD;
        return *this;
    }
    constexpr Fp& operator /= (const Fp& r) noexcept {
        long long a = r.val, b = MOD, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        val = val * u % MOD;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr bool operator == (const Fp& r) const noexcept {
        return this->val == r.val;
    }
    constexpr bool operator != (const Fp& r) const noexcept {
        return this->val != r.val;
    }
    friend constexpr ostream& operator << (ostream &os, const Fp<MOD>& x) noexcept {
        return os << x.val;
    }
    friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, long long n) noexcept {
        if (n == 0) return 1;
        auto t = modpow(a, n / 2);
        t = t * t;
        if (n & 1) t = t * a;
        return t;
    }
};
using mint = Fp<1000000007>;

int main(){
    ll n;   cin >> n;
    if(n%2) cout << "Black" << endl;
    else cout << "White" << endl;
}

#include<bits/stdc++.h>
using namespace std;
#define N 107
#define ldb long double
char s[N][N];
int g[N][N],cnt[N],n;
bool vis[N];
ldb f[N],cof[N];
void dfs(int v){
	cnt[v]++; vis[v]=1;
	for(int i=1;i<=n;i++)
		if(g[v][i]&&!vis[i])
			dfs(i);
}
int main(){
	//freopen("cpp.in","r",stdin);
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%s",s[i]+1);
		for(int j=1;j<=n;j++)
			g[i][j]=s[i][j]-'0';
	}
	for(int i=1;i<=n;i++){
		memset(vis,0,sizeof(vis));
		dfs(i);
	}
	for(int i=1;i<=n;i++)cof[i]=(1.0-1.0*cnt[i]/n),f[i]=1;
	ldb ans=0;
	for(int o=1;o<=100000;o++){
		for(int i=1;i<=n;i++)ans+=f[i];
		for(int i=1;i<=n;i++)f[i]=f[i]*cof[i];
	}
	ans/=n;
	printf("%.10Lf\n",ans);
	return 0;
}
