## DMOPC '20 Contest 5 P5 - Slacking Off Again

View as PDF

Points: 20 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type

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:

#### Input Specification

The first and only line contains two space-separated integers, and .

#### Output Specification

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.

#### Sample Input

3 3

#### Sample Output

YBB
BYB
BBY