Company: Rubrik_30oct
Difficulty: medium
Painting the wall Problem Description You're a painter! There is a wall of size N x M. You have to paint the wall using a paint brush of size X x Y. It is allowed to repaint the same portion of the wall again and again (i.e. overlap is allowed). It is also allowed to rotate the brush by 90°, as and when required while painting the wall. Here's the twist, there are some windows on the wall, and you cannot paint over these windows at any cost. The wall is represented by an N x M grid, where 'O' represents a portion of the wall and 'X' represents a window. Your task is to check whether the given wall can be completely painted (i.e. if all the 'O' portions of the wall can be completely painted) or not. Input format The first line contains a single integer T - the number of test cases. For each test case the first line contains 4 integers - N, M, X and Y - the dimensions of the wall and the paint brush. Each of the next N lines consist of M characters which are guaranteed to be either 'O' o