Anton's Vyshyvanka
Anton has a large collection of various vyshyvankas (traditional embroidered shirts), each possessing different magical powers.
The power of a vyshyvanka is determined by its pattern and is defined by the largest rune that can be identified in it. The pattern is a square matrix of size , consisting of blue and yellow cells. A rune of size can be represented as identical chessboards of size (with blue top left cell) arranged in the shape of a "+"-cross (formed by one vertical and one horizontal lines) with a hole in the middle. We consider that there is a rune of size in the pattern if and only if we can place our rune on the field such that the blue cells in the rune match the blue cells in the pattern. Note that it is not necessary for the yellow cells in the rune to match; they can coincide with either blue or yellow cells in the pattern.
Here is an example of a rune of size (four patterns of this rune are marked using green squares around them):
Note that any group of yellow cells in this pattern may also be blue and the rune will still exist:
Also, please note that this is not a rune of size , since patterns should be arranged in a form of "+"-cross:
Anton urgently needs to know the power of the vyshyvanka before wearing it, but unfortunately, at that time he was very busy, so he asked Chmyaaax (not yet evil) to write a program that would determine the power of the vyshyvanka based on the pattern. However, Chmyaks tricked him and, stealing something important, ran away. Therefore, now Anton is asking you to do it.
Input
The first line contains one integer — the size of the given pattern.
Each of the next lines contains characters, each of which is either '.
', or '#
', where '.
' represents a yellow cell and '#
' — a blue cell.
Output
In the only line, you need to output the power of the given pattern.
Please note that, if and only if there are no runes on the pattern, the answer is .
Examples
Note
The maximum rune on the pattern from the first example has a size of one:
The rune on the pattern of the second example is shown on the pictures in the statement. It can be shown that there is no rune of size on it.
Here is the vyshyvanka from the third sample:
Here is the only rune of size that can be found on it:
It can be shown that there are no runes of size or more here.
In the fourth sample, it can be shown that there are no runes at all. Again, please, note that the answer can be .
Scoring
( points): it is guaranteed that the answer is at most ;
( points): ;
( points): ;
( points): ;
( points): ;
( points): no additional constraints.