Acesrc is fond of cube nets. If we cut some edges of a cube, the surface of the cube can be unfolded into 2-dimensional space, and the resulting flat shape is called a cube net. There are 11 essentially different cube nets, listed below.
In this problem, we consider a generalization of the cube net, called cube hypernet. For each face of a cube, we divide it into k×kk×k small square cells. If we cut some edges of these small cells, the surface of the cube can be unfolded into 2-dimensional space, then the resulting flat shape is a cube hypernet. Clearly, cube nets are just a special type of cube hypernets where k=1k=1. The following picture illustrates a cube hypernet and explains how it is formed.
Identifying cube nets is a relatively easy job; however, this might not be true for cube hypernets. Here comes the challenge. Given a flat shape composed of small squares, determine whether it is a cube hypernet.
Input
The first line of the input is a single integer TT(1≤T≤30)(1≤T≤30), denoting the number of test cases.
For each test case, the first line contains two integers h,wh,w(1≤h,w≤100)(1≤h,w≤100), denoting the height and width of the input region. Each of the remaining hh lines contains ww characters, either '#''#' or '.''.'. The character '#''#' means that the square is part of the shape, while '.''.' not.
It is guaranteed that the input shape is nonempty and connected in four directions, and there is no hole inside the shape, not even a hole 8-connected to the outside. Also, the sum of h×wh×w over all test cases does not exceed 35000.
Output
For each test case, output yesyes in a line if the input shape is cube hypernet, and nono otherwise.