You are given a grid of letters. Your task is to find subgrids whose height and width is at least two and all the corners have the same letter.
For each letter, check if there is a valid subgrid whose corners have that letter.
The first line has two integers $n$ and $k$ : the size of the grid and the number of letters. The letters are the first $k$ uppercase letters.
After this, there are $n$ lines that describe the grid. Each line has $n$ letters.
Print $k$ lines: for each letter, YES if there is a valid subgrid and NO otherwise.
4 5 AAAA CBBC CBBE AAAA
· \n \n \n \n \n
YES YES NO NO NO
\n \n \n \n \n