Codeforces Round 632 (Div. 2)
A
Little Artem
Codeforces
1000
原题
←B →
翻译中…

Young boy Artem tries to paint a picture, and he asks his mother Medina to help him. Medina is very busy, that's why she asked for your help.

翻译中…

Artem wants to paint an $n \times m$ board. Each cell of the board should be colored in white or black.

翻译中…

Lets $B$ be the number of black cells that have at least one white neighbor adjacent by the side. Let $W$ be the number of white cells that have at least one black neighbor adjacent by the side. A coloring is called good if $B = W + 1$.

翻译中…

The first coloring shown below has $B=5$ and $W=4$ (all cells have at least one neighbor with the opposite color). However, the second coloring is not good as it has $B=4$, $W=4$ (only the bottom right cell doesn't have a neighbor with the opposite color).

翻译中…

image

翻译中…

Please, help Medina to find any good coloring. It's guaranteed that under given constraints the solution always exists. If there are several solutions, output any of them.

翻译中…

Input

翻译中…

Each test contains multiple test cases.

翻译中…

The first line contains the number of test cases $t$ ($1 \le t \le 20$). Each of the next $t$ lines contains two integers $n, m$ ($2 \le n,m \le 100$) — the number of rows and the number of columns in the grid.

翻译中…

Output

翻译中…

For each test case print $n$ lines, each of length $m$, where $i$-th line is the $i$-th row of your colored matrix (cell labeled with 'B' means that the cell is black, and 'W' means white). Do not use quotes.

翻译中…

It's guaranteed that under given constraints the solution always exists.

翻译中…

Note

翻译中…

In the first testcase, $B=3$, $W=2$.

翻译中…

In the second testcase, $B=5$, $W=4$. You can see the coloring in the statement.

翻译中…

样例

Input #1
2
3 2
3 3
Output #1
BW
WB
BB
BWB
BWW
BWB
InputCopy OutputCopy
题目信息
题号
1333A
时间限制
1 s
内存限制
256 MB
标签
构造

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。