The first line has the number of test cases T. (1≤T≤1000)
The first line of each test case has the number of horizontal streets r and the number of vertical streets c, separated by a space. (1≤r,c≤40)
The next r lines each hold a string of length c made only of the characters 0 and 1. If the j-th character of the i-th line is 1, the cell where horizontal street i meets vertical street j has a light pole. If it is 0, that cell is empty.