After counting patterns on his -pixel-high by -pixel-wide computer screen, Bob is getting bored again. So this time, he decides to tamper with the screen. He wants to colour each pixel either yellow (by lighting it up) or black (by keeping it unlit).
Bob thinks a rectangle of pixels, with both dimensions at least , is ugly if its first and last rows are identical and its first and last columns are identical. (Note: this definition is the same as the one in Problem 4.) For example, the following rectangles are ugly:
Please help Bob colour the screen in a way that contains the fewest ugly sub-rectangles possible!
Subtask 1 [10%]
Subtask 2 [10%]
Subtask 3 [20%]
Subtask 4 [30%]
Subtask 5 [30%]
No additional constraints.
The first and only line contains two space-separated integers, and .
Output an grid of characters—
Y for yellow and
B for black—representing a colouring that contains a minimal number of ugly sub-rectangles. If there are multiple such colourings possible, you may output any one of them.
YBB BYB BBY