Dilation – is one of the simplest methods of morphological image processing. Its main purpose is to expand image objects by applying some kernel.
Suppose we have some initial image $$$A$$$ consisting only of black (objects) and white (background) pixels. If a $$$3 \times 3$$$ kernel is used for dilation, then in the target image $$$B$$$ the pixel $$$B_{i, j}$$$ will be black if it was black in the source image ($$$A_{i, j}$$$ is black) or at least one was black from neighboring pixels (some neighbors may not exist): $$$A_{i - 1, j - 1}$$$, $$$A_{i - 1, j}$$$, $$$A_{i - 1, j + 1}$$$, $$$A_{i, j - 1}$$$, $$$A_{i, j + 1}$$$, $$$A_{i + 1, j - 1}$$$, $$$A_{i + 1, j}$$$ or $$$A_{i + 1, j + 1}$$$.
Let's assume that you have a processed $$$B$$$ image. Can you restore the original one? Write a program that, based on the image $$$B$$$, builds the image from which $$$B$$$ came after dilation using a kernel of size $$$3 \times 3$$$, if possible.
The first line contains the integers $$$n$$$ and $$$m$$$ ($$$1 \leq n, m \leq 100$$$) – the number of rows and columns in the image, respectively.
This is followed by $$$n$$$ lines, each of which contains $$$m$$$ characters. Each symbol describes a pixel in the image. The white pixel is indicated by a dot «.», and the black one is a hash symbol «#». It is guaranteed that there are no other characters in the lines.
The first line should contain the word «Possible», if it is possible to restore the original image, or «Impossible» – if it is not.
If the word «Possible» was output, then print $$$n$$$ lines, each containing $$$m$$$ characters – the supposed source image, encoded in the same way as the input one.
If there are multiple solutions print any of them.
5 5......###..###..###......
Possible ..... ..... ..#.. ..... .....
3 3....#....
Impossible
| Name |
|---|


