AT_past18_h Cを探せ!
Description
An object on a grid like these is called a **C**.
```
### #### #####
#.. #... #....
### #... #....
#### #....
#####
```
Illustrated above are **C**s of level $ 1 $ , $ 2 $ , and $ 3 $ , from left to right.
Formally, for a positive integer $ l $ , a **C**\* of level $ l $ is defined as follows.
- A **C** of level $ l $ is an $ (l+2) \times (l+2) $ square grid.
- Every cell on the upper, left, or lower border of the square has `#` written on it.
- Every other cell has `.` written on it.
You are given an $ N \times N $ grid. Each cell has `#` or `.` written on it.
The grid is described by $ N $ strings $ S_1,S_2,\dots,S_N $ ; the $ j $ -th character of $ S_i $ represents the character written on the cell in the $ i $ -th row from the top and $ j $ -th column from the left.
Find the maximum level of a **C** that can be obtained by extracting a (connected) square from this grid.
If no square extracted from the grid forms a **C**, print $ 0 $ .
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ S_1 $ $ S_2 $ $ \vdots $ $ S_N $
Output Format
Print the answer as an integer.
Explanation/Hint
### Sample Explanation 1
If you extract the square consisting of $ 1 $ -st through $ 3 $ -rd rows from the top and $ 2 $ -nd through $ 4 $ -th columns, it forms a **C** of level $ 1 $ .
One cannot extract a **C** of level $ 2 $ or greater from this grid.
### Sample Explanation 2
One cannot extract a **C** from this grid.
### Constraints
- $ N $ is an integer between $ 3 $ and $ 300 $ , inclusive.
- $ S_i $ is a length- $ N $ string consisting of `#` and `.`.