CF1948A.Special Characters

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Special Characters

You are given an integer nn.

Your task is to build a string of uppercase Latin letters. There must be exactly nn special characters in this string. Let's call a character special if it is equal to exactly one of its neighbors.

For example, there are 66 special characters in the AAABAACC string (at positions: 11, 33, 55, 66, 77 and 88).

Print any suitable string or report that there is no such string.

Input

The first line contains a single integer tt (1t501 \le t \le 50) — the number of test cases.

The only line of each test case contains a single integer nn (1n501 \le n \le 50).

Output

For each test case, print the answer as follows:

  • if there is no suitable string, print one line containing the string NO;
  • otherwise, print two lines. The first line should contain the string YES; on the second line print a string of length at most 200200 — the answer itself (it can be shown that if some answers exist, then there is an answer of length at most 200200). If there are several solutions, print any of them.

Samples

3
6
1
2
YES
AAABAACC
NO
YES
MM

在线编程 IDE

建议全屏模式获得最佳体验