Letter Triangles

No attempts yetTime limit1sMemory limit128 MB

Problem

You are given a size number and an uppercase starting letter. Print a letter triangle whose height equals the size. The size is an integer between 0 and 250 inclusive.

The $i$-th line of the triangle (counting from 1) contains $i$ copies of a single letter. The first line uses the given starting letter, and each following line advances to the next letter of the alphabet. The letters wrap around from Z back to A: once a line uses Z, the next line uses A. For example, if the starting letter is Z and the triangle has 3 lines, the letters used for the lines are Z, A, and B.

Input

The first line contains an integer $N$, the number of data sets that follow.

Each data set is given on its own line as a size (an integer from 0 to 250) followed by a single uppercase letter (A–Z), separated by a space. The size comes first, then the starting letter.

Output

For each data set, print its letter triangle. Print exactly one blank line between two consecutive triangles. A data set whose size is 0 produces a triangle with no lines, and the blank line separating it from its neighbours is still printed.