Given a map of N * M (2 <= N, M <= 12) , '.' means empty, '*' means walls. You need to build K circuits and no circuits could be nested in another. A circuit is a route connecting adjacent cells in a cell sequence, and also connect the first cell and the last cell. Each cell should be exactly in one circuit. How many ways do we have?
输入解释
The first line of input has an integer T, number of cases. For each case: The first line has three integers N M K, as described above. Then the following N lines each has M characters, ‘.’ or ‘*’.
输出解释
For each case output one lines. Each line is the answer % 1000000007 to the case.