#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
const ll MOD = (int)1e9 + 7;
const int N = 111;
ll res[N][N];
ll val[N][N];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
res[1][1] = 1;
for (int y = 0; y < n; ++y) {
for (int x = 0; x < n; ++x) {
cin >> val[y+1][x+1];
if (y > 0 || x > 0) {
res[y+1][x+1] = (res[y][x+1] + res[y+1][x]) % MOD;
}
}
}
ll ans = 0;
for (int y = 0; y < n; ++y) {
for (int x = 0; x < n; ++x) {
ll mult = (res[y+1][x+1] * res[n-y][n-x]) % MOD;
ans += (mult * val[y+1][x+1]) % MOD;
}
}
ans %= MOD;
cout << ans << '\n';
}