Mine sweeper is a popular game in the Windows operating system. The objective of the game is to locate the mines and mark their positions. You can place a flag on a cell where you think there is a mine using the right mouse button. To open a cell you believe does not contain a mine, you use the left mouse button. If the opened cell contains a mine, it explodes and you lose. Otherwise, there are two possible cases.
In the first case, a number from to appears on the square, indicating the number of mines adjacent to this cell. For example, if after clicking the left mouse button you see the number in a square, it means all neighboring cells contain mines.
In the second case, if there are no mines in any adjacent cells, not only is this cell opened, but all adjacent cells are opened as well. If some of these adjacent cells also have no neighboring mines, their neighbors are opened recursively. The computer assists you by revealing all contiguous mine-free cells in this process.
The goal is to open all mine-free cells.
Tom enjoys this game, but unfortunately his right mouse button is broken, so he can only use the left mouse button. To avoid further damaging his mouse, he wants to finish the game using the minimum possible number of left clicks. Given the initial state of the game, determine the minimum number of left mouse button clicks required.

The first line contains an integer (T \leq 12), the number of test cases.
Each test case starts with a line containing an integer (5 \leq n \leq 9), the size of the minefield.
Each of the next lines contains characters M_{ij} (1 \leq i, j \leq n), where M_{ij} indicates the status of the cell at row and column : - '' denotes a mine. - '' to '' denote the number of mines adjacent to the cell. '' indicates there are no adjacent mines.
All positions are guaranteed to be valid.
For each test case, print a line containing the test case number (starting from ), followed by the minimum number of left mouse clicks required (see example output).
Example
2
5
1112@
12@@2
24853
1@@52
11121
5
111@
12@1
1211
0000
0000
Case 1: 7
Case 2: 2Example 1