You are given a grid of size n∗m containing only 0s and 1s. A cross is a 'X' like structure formed in the grid when any two sequence of diagonal 1s intersects each other. Find the count of total number of crosses present in the grid. Since the answer can be large, compute it modulo 109+7.
INPUT FORMAT
The first line contains an integer, t - denoting the number of test cases.
The first line of each test case contains two integers n and m - denoting the number of rows, and columns grid has.
The following n lines of each test case contain a string of length m having characters as either '0' or '1'.
It is guaranteed that the sum of n∗m across all test cases doesn't exceed 107.
OUTPUT FORMAT
For each test case, print the answer modulo 109+7 in a new line.
Constraints
1<=t<=100
1<=n,m<=107 and sum of n∗m across all test cases <= 107
Each cell in Grid is either 0 or 1