Description
You are given two integers $N$ and $M$.
Output an $N \times N$ grid whose cells are colored either white or black and which satisfies the following conditions. If no such grid exists, print -1.
- The sizes of the connected components of white cells in the grid consist of exactly $M$ distinct values.
- The sizes of the connected components of black cells in the grid consist of exactly $M$ distinct values.
If there are multiple solutions, you may output any of them.
Input
The first line contains two integers $N$ and $M$ ($2 \le N \le 2000$, $1 \le M \le 2000$).
Output
If a grid satisfying the conditions exists, print $N$ lines. On the $i$-th line ($1 \le i \le N$), print a string $s_i$ of length $N$ as follows:
- If the cell in row $i$, column $j$ ($1 \le j \le N$) of the constructed grid is white, then the $j$-th character of $s_i$ must be
.(dot). - If the cell in row $i$, column $j$ ($1 \le j \le N$) of the constructed grid is black, then the $j$-th character of $s_i$ must be
#.
If no grid satisfying the conditions exists, print -1 on the first line.
Examples
Input 1
4 2
Output 1
###. ..## ##.# .##.
Input 2
2 3
Output 2
-1
Input 3
12 7
Output 3
.#..#.#.##.# .#.#..#.##.# .##...#.##.# .#.#..#.##.# .#..#.##..## ......###### ######...... #...##..###. #.##.#.#.... #...##.#.... #.####.#.... #.####..###.
Note
Two white cells $c_1, c_2$ are said to be connected if one can move from one to the other by repeatedly moving to a vertically or horizontally adjacent cell while passing only through white cells.
A set of white cells $S$ is called a connected component if $S$ satisfies the following conditions:
- Any two cells in $S$ are connected.
- No white cell not in $S$ is connected to any cell in $S$.
Connected components of black cells are defined similarly.
For each connected component, its size is defined as the number of cells it contains.
Explanation of Sample Output 1: The sizes of the connected components of white cells are the two distinct values 1 and 2. The sizes of the connected components of black cells are also the two distinct values 4 and 6.
Figure for Sample Output 1
Figure for Sample Output 3