# Strange Patterns Reversed

Tough Dash, September 202...
Limits 1s, 512 MB

You will be given an $R \times C$ grid of asterisks ($\texttt{*}$) and dots ($\texttt{.}$). The grid is the top-left view of an infinitely repeating pattern of diamonds. And, it is guaranteed that at least one asterisk will be present on the grid given to you.

The size of a diamond is defined by an integer $D$.

When $D = 1$,

*


When $D = 2$,

.*.
***
.*.


When $D = 3$,

..*..
.***.
*****
.***.
..*..


When $D = 4$,

...*...
..***..
.*****.
*******
.*****.
..***..
...*...


And, so on.

Given such a grid you have the determine the $D$ for the diamond.

## Input

The input will start with two integers $R$ and $C$ ($1 \le R, C \le 10$).

The following $R$ lines will contain $C$ characters each (either asterisks or dots), representing the grid.

## Output

Print the size of the diamond in the pattern in the grid as defined in the problem statement.

## Sample

InputOutput
10 10
..*....*..
.***..***.
**********
.***..***.
..*....*..
..*....*..
.***..***.
**********
.***..***.
..*....*..

3