Okarun is studying alien art. Alien art is represented by a square matrix that contains blank characters, digits from $$$1$$$ to $$$9$$$, the symbol '$$$+$$$', or the symbol '$$$*$$$'. We call such square matrix an art matrix, and it is defined recursively as follows:
The inner submatrix is obtained by removing the leftmost and rightmost columns, as well as the top and bottom rows. Two art matrices are considered non-adjacent if there is at least one blank character adjacent to every cell on their borders.
Each art matrix has an associated beauty value $$$b$$$, defined as:
Given an art matrix, tell Okarun the beauty of the matrix.
The first line contains a single integer $$$N$$$ ($$$1 \leq N \leq 1000$$$) — the size of the matrix.
The next $$$N$$$ lines each contain a string of $$$N$$$ characters representing the $$$i$$$-th row of the matrix. Blank cells are represented by the '.' character.
Print a single integer $$$b$$$ — the beauty of the Alien art matrix modulo $$$10^9 + 7$$$.
6+....+.3.4....1.......2..1.1..+....+
12
11+.........+.*...*.......3.3..+.+....2....5....3.3..+.+..*...*...................+.+.*.*.....1...4.....+.+.*.*.+.........+
172
2****
1
12
2
| Name |
|---|


