A group of urban planners are tasked with design of a new city. The new city is rectangleshape city. The city will be divided into N rows and M columns of same-size square blocks. There are also several streets lying between these blocks. The table below represents the top-view map of one particular city having 4 rows by 6 columns of same-size square blocks. Each block is indicated by a star (‘*’). The black borders between each block represent streets. In order to go from one block to adjacent block, one has to cross the street using a crosswalk. Each crosswalk must connect a pair of horizontally or vertically adjacent blocks. Moreover, there may be more than one crosswalk between each pair of blocks. We say that a crosswalk A belongs to a block B, if and only if, the crosswalk A connects the block B with any horizontally or vertically adjacent block of the block B. We know the number of crosswalks that belongs to each block except only one block. Your task is to find the number of crosswalks of that block. Input The first line contains a single integer T indicate the number of test cases (1 ≤ T ≤ 10). Then T test cases follow.
2/2 Sample Input 1 33 223 1 -1 3 110 Sample Output 1