\problemname{Matrix Keypad} A matrix keypad consists of an $r \times c$ grid of buttons. Additionally, there is one wire for each row and one wire for each column. These wires are exposed through pins so the keypad can be connected to a larger circuit. When no buttons are pressed, none of the $r+c$ wires touch each other. However, if the button at row $i$ and column $j$ is pressed then the wires for row $i$ and column $j$ come into contact. Thus, one can detect if a button is pressed by sending a signal down each row wire and checking if this signal is detected along some a column wire. If just a single button is pressed, it can be identified by sequentially sending a signal along each row wire and, for each such row wire, sequentially checking the column wires to see if any of them received the signal. If multiple buttons are pressed, it may not be possible to uniquely identify which buttons are pressed. In the picture below, any two of the highlighted row pins are connected to any two highlighted column pins. \begin{center} \includegraphics[scale=0.8]{keypad.pdf} \end{center} The software you are using to detect which buttons are pressed was poorly implemented. After probing each row/column combination, it stores the results of this interaction in an $r \times c$ grid. The entry in row $i$ and column $j$ is \texttt{1} if there is {\em some} row $i'$ and column $j'$ such that row $i$ is connected to column $j'$ and row $i'$ is connected to column $j$. Your job is to interpret as much information from such a grid as is possible. Determine which buttons are definitely pressed and which buttons are definitely not pressed. \section*{Input} The first line of input contains a single integer $T \leq 200$ indicating the number of test cases. The first line of each test case contains two integers $r$ and $c$ where $1 \leq r \leq 10$ and $1 \leq c \leq 10$. This indicates that the keypad is an $r \times c$ grid of buttons. The remaining $r$ lines of a test case describe the grid. The $i$'th row contains a string of consecutive \texttt{0} and \texttt{1} characters. These will not be separated by spaces. \section*{Output} For each test case, output the following. If there is no combination of button presses on the keypad that would produce this \texttt{0}/\texttt{1} grid then simply output a line containing the word \texttt{impossible} Otherwise, you should output $r$ lines, each containing a string of length $c$. This should describe a grid where for the entry in row $i$ and column $j$ the character output is: \begin{itemize} \item \texttt{N} if in all possible button combinations that would produce the input grid, the $j$'th button on row $i$ is not pressed. \item \texttt{P} if in all possible button combinations that would produce the input grid, the $j$'th button on row $i$ is pressed. \item \texttt{I} if there are multiple button combinations that would produce the input grid where the $j$'th button on row $i$ is pressed in at least one of these combinations and is not pressed in at least one of these combinations. \end{itemize} Finally, the last line of each test case should be followed by the string \texttt{----------} (10 dashes).