E. Grid Coloring
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Templates for this problem are available here.

Bob has an $$$n \times n$$$ grid of squares. Each square can be colored either red or blue. Bob is a fair person. He calls a grid "good" if every square is adjacent to exactly $$$2$$$ squares of the same color. Two squares are considered adjacent if they share a side.

Given an integer $$$n$$$, output a good coloring of an $$$n \times n$$$ grid or state that no good coloring exists.

Input

Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). The description of the test cases follows.

Each test case consists of a single integer $$$n$$$ ($$$1 \le n \le 1000$$$) — the size of the grid.

It is guaranteed that the sum of $$$n^2$$$ over all test cases does not exceed $$$10^6$$$.

Output

For each test case, print YES if there is a solution, and NO otherwise. You may print every letter in any case you want (so, for example, the strings "yEs", "yes", "Yes", and "YES" will all be recognized as positive answers).

If you printed YES, print $$$n$$$ additional lines. The $$$i$$$-th of these should contain $$$n$$$ characters R or B, indicating the colors of the squares in the $$$i$$$-th row of the grid in your coloring.

If there are multiple solutions, you may print any.

Example
Input
2
2
3
Output
YES
BB
BB
NO
Note

In the first test case, every square is adjacent to two squares of the same color. For example, $$$(1, 1)$$$ is adjacent to $$$(1, 2)$$$ and $$$(2, 1)$$$, and all of those squares are blue.

It can be shown that there is no good coloring of a $$$3 \times 3$$$ grid.