Have you ever played the game minesweeper1? It comes with an operating system whose name slips our mind. Well, the aim of the game is to discover where all the mines are hidden in a rectangular $$m \times n$$ playing field. To help you, numbers are displayed in the boxes of the playing field. These indicate how many mines are located in adjacent boxes. This includes either horizontally, vertically or diagonally adjacent boxes. For example, suppose there are two mines hidden in a $$4\times 4$$ playing field (their location is indicated by an asterisk):
*... .... .*.. ....
If we indicate how many mines are located in adjacent boxes in the empty boxes (indicated by dots), we get the following representation of the court:
*100 2210 1*10 1110
As you might already have noticed, each box has eight adjacent boxes at most.
The input consists of $$t$$ test cases ($$t \leq 100$$). The first line of the input contains an integer $$t$$. Then follows the description of the $$t$$ test cases. The first line of the description of a test case contains two integers $$m$$ and $$n$$ ($$0 < m, n \leq 100$$), which respectively indicate the number of rows and number of columns of the table. This is followed by $$m$$ lines each containing exactly $$n$$ characters that indicate whether the corresponding grid contains a mine (*) or not (.).
For each test case, print the playing field in the same format as in the input, but where each box that does not contain a mine is now represented by a number indicating how many adjacent boxes do contain a mine. Make sure there is a blank line between successive playing fields.
Input:
2 4 4 *... .... .*.. .... 3 5 **... ..... .*...
Output:
*100 2210 1*10 1110 **100 33200 1*100