Baby Ming and Binary image

Accepts: 1
Submissions: 12
Time Limit: 2000/1000 MS (Java/Others)
Memory Limit: 65536/65536 K (Java/Others)
Problem Description
Baby Ming likes to deal with pixel map in the following way: First, converting the pixel map into binary image (recorded as 01), and then, in the binary figures, for each grid, add up the grid and its neighboring gridsĄŻ binary number, and store in matrix $Mat$. All the pictures Baby Ming chosen have a blank upper margin and bottom margin (the value of which is 0 in the binary image), because he thinks such a picture is beautiful. The matrix $Mat$ is so big that Baby Ming is worried about the mistakes in the matrix. So he wants to know whether the binary image can be regained according to the $Mat$. ![http://bestcoder.hdu.edu.cn/data/images/C664-1004-1.jpg](http://bestcoder.hdu.edu.cn/data/images/C664-1004-1.jpg)
Input
In the first line contains a single positive integer $T$, indicating number of test case. In the second line there are two numbers $n, m$, indicating the size of the binary image and the size of the matrix $Mat$ In the next $n$ lines, each line input m numbers, indicating the matrix $Mat$. $1 \leq T \leq 30, 2 < n \leq 12, m \leq 100$
Output
Print Impossible, if it is impossible to regain the binary image. Print Multiple, if it has more than one result. Otherwise, print the binary image (Baby Ming's 01 matrix)
Sample Input
2
4 4
1 2 3 2
2 3 4 2
2 3 4 2
1 1 1 0
3 1
1
1
0



Sample Output
0 0 0 0
0 1 1 1
0 1 0 0
0 0 0 0
Impossible

Hint
in the second sample, the matrix[1 0 0] is not Baby Ming's Matrix, so there is no answer